Changeset 982f95d for src/ResolvExpr/PtrsCastable.cc
- Timestamp:
- Jun 15, 2018, 5:09:29 PM (6 years ago)
- Branches:
- new-env
- Children:
- 97397a26
- Parents:
- 1d7b0a8
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/PtrsCastable.cc
r1d7b0a8 r982f95d 15 15 16 16 #include "Common/PassVisitor.h" 17 #include "ResolvExpr/TypeEnvironment.h" // for EqvClass, TypeEnvironment17 #include "ResolvExpr/TypeEnvironment.h" // for ClassRef, TypeEnvironment 18 18 #include "SymTab/Indexer.h" // for Indexer 19 19 #include "SynTree/Declaration.h" // for TypeDecl, TypeDecl::Kind::Ftype … … 63 63 } // if 64 64 } //if 65 } else if ( const EqvClass *eqvClass = env.lookup( typeInst->get_name() ) ) {66 if ( eqvClass ->data.kind == TypeDecl::Ftype ) {65 } else if ( ClassRef eqvClass = env.lookup( typeInst->get_name() ) ) { 66 if ( eqvClass.get_bound().data.kind == TypeDecl::Ftype ) { 67 67 return -1; 68 68 } // if … … 78 78 int ptrsCastable( Type *src, Type *dest, const TypeEnvironment &env, const SymTab::Indexer &indexer ) { 79 79 if ( TypeInstType *destAsTypeInst = dynamic_cast< TypeInstType* >( dest ) ) { 80 if ( const EqvClass *eqvClass = env.lookup( destAsTypeInst->get_name() ) ) {80 if ( ClassRef eqvClass = env.lookup( destAsTypeInst->get_name() ) ) { 81 81 // xxx - should this be ptrsCastable? 82 return ptrsAssignable( src, eqvClass ->type, env );82 return ptrsAssignable( src, eqvClass.get_bound().type, env ); 83 83 } // if 84 84 } // if
Note: See TracChangeset
for help on using the changeset viewer.