Changes in src/ResolvExpr/PtrsCastable.cc [00ac42e:12145b9]
- File:
-
- 1 edited
-
src/ResolvExpr/PtrsCastable.cc (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/PtrsCastable.cc
r00ac42e r12145b9 57 57 return -1; 58 58 } else if ( TypeInstType *typeInst = dynamic_cast< TypeInstType* >( src ) ) { 59 EqvClass eqvClass; 59 60 if ( NamedTypeDecl *ntDecl = indexer.lookupType( typeInst->get_name() ) ) { 60 61 if ( TypeDecl *tyDecl = dynamic_cast< TypeDecl* >( ntDecl ) ) { … … 63 64 } // if 64 65 } //if 65 } else if ( const EqvClass *eqvClass = env.lookup( typeInst->get_name()) ) {66 if ( eqvClass ->data.kind == TypeDecl::Ftype ) {66 } else if ( env.lookup( typeInst->get_name(), eqvClass ) ) { 67 if ( eqvClass.data.kind == TypeDecl::Ftype ) { 67 68 return -1; 68 69 } // if … … 78 79 int ptrsCastable( Type *src, Type *dest, const TypeEnvironment &env, const SymTab::Indexer &indexer ) { 79 80 if ( TypeInstType *destAsTypeInst = dynamic_cast< TypeInstType* >( dest ) ) { 80 if ( const EqvClass *eqvClass = env.lookup( destAsTypeInst->get_name() ) ) { 81 EqvClass eqvClass; 82 if ( env.lookup( destAsTypeInst->get_name(), eqvClass ) ) { 81 83 // xxx - should this be ptrsCastable? 82 return ptrsAssignable( src, eqvClass ->type, env );84 return ptrsAssignable( src, eqvClass.type, env ); 83 85 } // if 84 86 } // if
Note:
See TracChangeset
for help on using the changeset viewer.