Changeset bd06384 for src/ResolvExpr/Resolver.cc
- Timestamp:
- Mar 22, 2018, 4:49:53 PM (7 years ago)
- Branches:
- new-env, with_gc
- Children:
- dbc2c2c
- Parents:
- 7e4b44db
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/Resolver.cc
r7e4b44db rbd06384 219 219 assertf( expr, "expected a non-null expression." ); 220 220 221 static CastExpr untyped( nullptr ); // cast to void221 auto untyped = new CastExpr{ expr }; // cast to void 222 222 223 223 // set up and resolve expression cast to void 224 untyped.arg = expr;225 224 Alternative choice; 226 findUnfinishedKindExpression( &untyped, choice, indexer, "", standardAlternativeFilter, true );225 findUnfinishedKindExpression( untyped, choice, indexer, "", standardAlternativeFilter, true ); 227 226 CastExpr * castExpr = strict_dynamic_cast< CastExpr * >( choice.expr ); 228 227 env = std::move( choice.env ); 229 228 230 229 // clean up resolved expression 231 Expression * ret = castExpr->arg; 232 castExpr->arg = nullptr; 233 234 // unlink the arg so that it isn't deleted twice at the end of the program 235 untyped.arg = nullptr; 236 return ret; 230 return castExpr->arg; 237 231 } 238 232
Note: See TracChangeset
for help on using the changeset viewer.