Changeset 25fcb84 for src/ResolvExpr/AlternativeFinder.cc
- Timestamp:
- May 31, 2018, 10:41:38 AM (4 years ago)
- Branches:
- aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, with_gc
- Children:
- cf5e5b1
- Parents:
- d15a45d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/AlternativeFinder.cc
rd15a45d r25fcb84 299 299 // it's okay for the aggregate expression to have reference type -- cast it to the base type to treat the aggregate as the referenced value 300 300 std::unique_ptr<Expression> aggrExpr( alt.expr->clone() ); 301 alt.env.apply( aggrExpr-> get_result());302 Type * aggrType = aggrExpr-> get_result();301 alt.env.apply( aggrExpr->result ); 302 Type * aggrType = aggrExpr->result; 303 303 if ( dynamic_cast< ReferenceType * >( aggrType ) ) { 304 304 aggrType = aggrType->stripReferences(); … … 306 306 } 307 307 308 if ( StructInstType *structInst = dynamic_cast< StructInstType* >( aggrExpr-> get_result()) ) {308 if ( StructInstType *structInst = dynamic_cast< StructInstType* >( aggrExpr->result ) ) { 309 309 NameExpr nameExpr( "" ); 310 310 addAggMembers( structInst, aggrExpr.get(), alt.cost+Cost::safe, alt.env, &nameExpr ); 311 } else if ( UnionInstType *unionInst = dynamic_cast< UnionInstType* >( aggrExpr-> get_result()) ) {311 } else if ( UnionInstType *unionInst = dynamic_cast< UnionInstType* >( aggrExpr->result ) ) { 312 312 NameExpr nameExpr( "" ); 313 313 addAggMembers( unionInst, aggrExpr.get(), alt.cost+Cost::safe, alt.env, &nameExpr ); … … 320 320 NameExpr * nameExpr = dynamic_cast< NameExpr * >( member ); 321 321 if ( ! nameExpr ) return; 322 const std::string & name = nameExpr-> get_name();322 const std::string & name = nameExpr->name; 323 323 std::list< Declaration* > members; 324 324 aggInst->lookup( name, members );
Note: See TracChangeset
for help on using the changeset viewer.