- File:
-
- 1 edited
-
src/ResolvExpr/ConversionCost.cc (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/ConversionCost.cc
rb0d9ff7 rfc134a48 338 338 } else if ( const EnumInstType * enumInst = dynamic_cast< const EnumInstType * >( dest ) ) { 339 339 const EnumDecl * base_enum = enumInst->baseEnum; 340 if ( const Type * base = base_enum->base ) { 340 if ( const Type * base = base_enum->base ) { // if the base enum has a base (if it is typed) 341 341 if ( const BasicType * enumBaseAstBasic = dynamic_cast< const BasicType *> (base) ) { 342 342 conversionCostFromBasicToBasic(basicType, enumBaseAstBasic); … … 632 632 } else if ( const ast::EnumInstType * enumInst = dynamic_cast< const ast::EnumInstType * >( dst ) ) { 633 633 const ast::EnumDecl * enumDecl = enumInst->base.get(); 634 if ( enumDecl->isTyped && !enumDecl->base.get() ) { 635 cost = Cost::infinity; 636 } else if ( const ast::Type * enumType = enumDecl->base.get() ) { 634 if ( const ast::Type * enumType = enumDecl->base.get() ) { 637 635 if ( const ast::BasicType * enumTypeAsBasic = dynamic_cast<const ast::BasicType *>(enumType) ) { 638 636 conversionCostFromBasicToBasic( basicType, enumTypeAsBasic ); … … 696 694 const ast::EnumDecl * baseEnum = enumInstType->base; 697 695 if ( const ast::Type * baseType = baseEnum->base ) { 698 cost Calc( baseType, dst, srcIsLvalue, symtab, env );696 cost = costCalc( baseType, dst, srcIsLvalue, symtab, env ); 699 697 } else { 700 698 (void)enumInstType;
Note:
See TracChangeset
for help on using the changeset viewer.