Changeset 795d450
- Timestamp:
- Jul 18, 2017, 4:20:02 PM (7 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, 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, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 242a902
- Parents:
- e6cee92
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/GenPoly/Box.cc
re6cee92 r795d450 607 607 } 608 608 } else { 609 throw SemanticError( "Cannot pass non-struct type for generic struct ");609 throw SemanticError( "Cannot pass non-struct type for generic struct: ", argBaseType ); 610 610 } 611 611 } … … 1040 1040 // remove dereference from polymorphic types since they are boxed. 1041 1041 Expression *ret = appExpr->get_args().front(); 1042 // fix expr type to remove reference 1042 1043 delete ret->get_result(); 1043 ret->set_result( appExpr->get_result()->clone() ); 1044 Type * baseType = InitTweak::getPointerBase( appExpr->get_result() ); 1045 assert( baseType ); 1046 ret->set_result( baseType->clone() ); 1044 1047 if ( appExpr->get_env() ) { 1045 1048 ret->set_env( appExpr->get_env() );
Note: See TracChangeset
for help on using the changeset viewer.