Changes in src/InitTweak/InitTweak.cc [14c0f7b:251ce80]
- File:
-
- 1 edited
-
src/InitTweak/InitTweak.cc (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/InitTweak/InitTweak.cc
r14c0f7b r251ce80 882 882 if (!assign) { 883 883 auto td = new ast::TypeDecl(CodeLocation(), "T", {}, nullptr, ast::TypeDecl::Dtype, true); 884 assign = new ast::FunctionDecl(CodeLocation(), "?=?", { td},884 assign = new ast::FunctionDecl(CodeLocation(), "?=?", {}, 885 885 { new ast::ObjectDecl(CodeLocation(), "_dst", new ast::ReferenceType(new ast::TypeInstType("T", td))), 886 886 new ast::ObjectDecl(CodeLocation(), "_src", new ast::TypeInstType("T", td))}, … … 891 891 dst = new ast::AddressExpr(dst); 892 892 } 893 } else { 893 } 894 else { 894 895 dst = new ast::CastExpr(dst, new ast::ReferenceType(dst->result, {})); 895 896 } … … 899 900 } 900 901 } 901 auto var = ast::VariableExpr::functionPointer(dst->location, assign); 902 auto app = new ast::ApplicationExpr(dst->location, var, {dst, src}); 903 // Skip the resolver, just set the result to the correct type. 904 app->result = ast::deepCopy( src->result ); 905 return app; 902 return new ast::ApplicationExpr(dst->location, ast::VariableExpr::functionPointer(dst->location, assign), {dst, src}); 906 903 } 907 904
Note:
See TracChangeset
for help on using the changeset viewer.