- Timestamp:
- Apr 3, 2017, 11:24:44 AM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 5995116, 727cf70f
- Parents:
- fc19129
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/PtrsCastable.cc
rfc19129 r1d29d46 68 68 return 1; 69 69 } 70 int functionCast( Type *src, const TypeEnvironment &env, const SymTab::Indexer &indexer ) { 71 return -1 * objectCast( src, env, indexer ); // reverse the sense of objectCast 72 } 70 73 71 74 int ptrsCastable( Type *src, Type *dest, const TypeEnvironment &env, const SymTab::Indexer &indexer ) { … … 106 109 107 110 void PtrsCastable::visit(FunctionType *functionType) { 108 result = -1; 111 // result = -1; 112 result = functionCast( dest, env, indexer ); 109 113 } 110 114 … … 136 140 137 141 void PtrsCastable::visit(TypeInstType *inst) { 138 result = objectCast( inst, env, indexer ) > 0 && objectCast( dest, env, indexer ) > 0 ? 1 : -1; 142 //result = objectCast( inst, env, indexer ) > 0 && objectCast( dest, env, indexer ) > 0 ? 1 : -1; 143 result = objectCast( inst, env, indexer ) == objectCast( dest, env, indexer ) ? 1 : -1; 139 144 } 140 145
Note: See TracChangeset
for help on using the changeset viewer.