Changes in src/ResolvExpr/CastCost.cc [982f95d:8e18b8e]
- File:
-
- 1 edited
-
src/ResolvExpr/CastCost.cc (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/CastCost.cc
r982f95d r8e18b8e 18 18 #include "ConversionCost.h" // for ConversionCost 19 19 #include "Cost.h" // for Cost, Cost::infinity 20 #include "ResolvExpr/TypeEnvironment.h" // for TypeEnvironment, ClassRef20 #include "ResolvExpr/TypeEnvironment.h" // for TypeEnvironment, EqvClass 21 21 #include "SymTab/Indexer.h" // for Indexer 22 22 #include "SynTree/Declaration.h" // for TypeDecl, NamedTypeDecl … … 43 43 Cost castCost( Type *src, Type *dest, const SymTab::Indexer &indexer, const TypeEnvironment &env ) { 44 44 if ( TypeInstType *destAsTypeInst = dynamic_cast< TypeInstType* >( dest ) ) { 45 if ( ClassRefeqvClass = env.lookup( destAsTypeInst->get_name() ) ) {46 if ( Type* boundTy = eqvClass.get_bound().type ) {47 return castCost( src, boundTy, indexer, env );45 if ( const EqvClass* eqvClass = env.lookup( destAsTypeInst->get_name() ) ) { 46 if ( eqvClass->type ) { 47 return castCost( src, eqvClass->type, indexer, env ); 48 48 } else { 49 49 return Cost::infinity;
Note:
See TracChangeset
for help on using the changeset viewer.