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