Changeset 2295320
- Timestamp:
- Nov 11, 2024, 10:35:49 PM (30 hours ago)
- Branches:
- master
- Children:
- 47174c4
- Parents:
- 0cb3479 (diff), 2ae845e9 (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/Resolver.cpp
r0cb3479 r2295320 201 201 && typesCompatible( castExpr->arg->result, castExpr->result ) 202 202 ) { 203 auto argAsEnum = castExpr->arg.as<ast::EnumInstType>(); 204 auto resultAsEnum = castExpr->result.as<ast::EnumInstType>(); 205 if (argAsEnum && resultAsEnum) { 206 if (argAsEnum->base->name != resultAsEnum->base->name) { 207 std::cerr << "Enum Cast: " << argAsEnum->base->name << " to " << resultAsEnum->base->name << std::endl; 208 return castExpr; 209 } 203 ast::EnumInstType const * arg, * result; 204 if ( ( result = castExpr->result.as<ast::EnumInstType>() ) && 205 ( arg = castExpr->arg.as<ast::EnumInstType>() ) && 206 arg->base->name != result->base->name) { 207 return castExpr; 210 208 } 211 209 // generated cast is the same type as its argument, remove it after keeping env
Note: See TracChangeset
for help on using the changeset viewer.