- Timestamp:
- Mar 8, 2024, 12:22:59 AM (10 months ago)
- Branches:
- master
- Children:
- 03606ce
- Parents:
- 76fe046
- Location:
- src/ResolvExpr
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/CommonType.cc
r76fe046 r06601401 681 681 682 682 void postvisit( const ast::EnumPosType * enumPos ) { 683 if ( dynamic_cast<const ast::EnumPosType *>(type2) ) {683 if ( auto type2AsPos = dynamic_cast<const ast::EnumPosType *>(type2) ) { 684 684 // result = commonType( type2AsPos->instance, enumPos->instance, tenv, need, have, open, widen ); 685 result = enumPos; 685 // result = enumPos; 686 if ( enumPos->instance->base->name == type2AsPos->instance->base->name ) { 687 result = type2; 688 } 686 689 } else if ( dynamic_cast<const ast::BasicType *>(type2) ) { 687 690 result = type2; -
src/ResolvExpr/Unify.cc
r76fe046 r06601401 517 517 } 518 518 519 void postvisit( const ast::EnumPosType * ) {519 void postvisit( const ast::EnumPosType * posType ) { 520 520 // Lazy approach for now 521 521 auto otherPos = dynamic_cast< const ast::EnumPosType *>(type2); 522 if (otherPos) this->result = otherPos; 522 if ( otherPos ) { 523 if ( otherPos->instance->base->name == posType->instance->base->name ) 524 result = otherPos; 525 } 523 526 } 524 527
Note: See TracChangeset
for help on using the changeset viewer.