Changeset 85855b0 for src/GenPoly
- Timestamp:
- Jun 10, 2024, 2:43:13 AM (6 months ago)
- Branches:
- master
- Children:
- 42cdd07d
- Parents:
- d68de59
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/GenPoly/Lvalue.cpp
rd68de59 r85855b0 389 389 assert( 0 == diff ); 390 390 // Remove useless generated casts. 391 if ( expr->isGenerated &&391 if ( expr->isGenerated == ast::GeneratedFlag::GeneratedCast && 392 392 ResolvExpr::typesCompatible( 393 393 expr->result, … … 398 398 std::cerr << "-- " << expr->arg->result << std::endl; 399 399 ) 400 auto argAsEnum = expr->arg.as<ast::EnumInstType>(); 401 auto resultAsEnum = expr->result.as<ast::EnumInstType>(); 402 if (argAsEnum && resultAsEnum) { 403 if (argAsEnum->base->name != resultAsEnum->base->name) { 404 return expr; 405 } 406 } 400 407 return ast::mutate_field( expr->arg.get(), 401 408 &ast::Expr::env, expr->env.get() );
Note: See TracChangeset
for help on using the changeset viewer.