Changeset 4520b77e for src/ResolvExpr/ConversionCost.cc
- Timestamp:
- Sep 20, 2022, 8:37:05 PM (19 months ago)
- Branches:
- ADT, ast-experimental, master, pthread-emulation
- Children:
- a065f1f
- Parents:
- d489da8 (diff), 12df6fe (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/ConversionCost.cc
rd489da8 r4520b77e 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 ) { // if the base enum has a base (if it is typed)340 if ( const Type * base = base_enum->base ) { 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 ( const ast::Type * enumType = enumDecl->base.get() ) { 634 if ( enumDecl->isTyped && !enumDecl->base.get() ) { 635 cost = Cost::infinity; 636 } else if ( const ast::Type * enumType = enumDecl->base.get() ) { 635 637 if ( const ast::BasicType * enumTypeAsBasic = dynamic_cast<const ast::BasicType *>(enumType) ) { 636 638 conversionCostFromBasicToBasic( basicType, enumTypeAsBasic ); … … 694 696 const ast::EnumDecl * baseEnum = enumInstType->base; 695 697 if ( const ast::Type * baseType = baseEnum->base ) { 696 cost = costCalc( baseType, dst, srcIsLvalue, symtab, env );698 costCalc( baseType, dst, srcIsLvalue, symtab, env ); 697 699 } else { 698 700 (void)enumInstType;
Note: See TracChangeset
for help on using the changeset viewer.