Changeset 4139e3d for src/ResolvExpr
- Timestamp:
- May 23, 2019, 10:51:23 AM (6 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 3ca912a
- Parents:
- 335f2d8
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/Unify.cc
r335f2d8 r4139e3d 179 179 result = false; 180 180 } else { 181 result = env.bindVarToVar( 182 var1, var2, TypeDecl::Data{ entry1->second, entry2->second }, needAssertions, 181 result = env.bindVarToVar( 182 var1, var2, TypeDecl::Data{ entry1->second, entry2->second }, needAssertions, 183 183 haveAssertions, openVars, widenMode, indexer ); 184 184 } … … 648 648 649 649 ast::ptr<ast::Type> extractResultType( const ast::FunctionType * func ) { 650 assert(!"restore after AST added to build"); 651 // if ( func->returns.empty() ) return new ast::VoidType{}; 652 // if ( func->returns.size() == 1 ) return func->returns[0]->get_type(); 653 654 // std::vector<ast::ptr<ast::Type>> tys; 655 // for ( const ast::DeclWithType * decl : func->returns ) { 656 // tys.emplace_back( decl->get_type() ); 657 // } 658 // return new ast::TupleType{ std::move(tys) }; 650 if ( func->returns.empty() ) return new ast::VoidType{}; 651 if ( func->returns.size() == 1 ) return func->returns[0]->get_type(); 652 653 std::vector<ast::ptr<ast::Type>> tys; 654 for ( const ast::DeclWithType * decl : func->returns ) { 655 tys.emplace_back( decl->get_type() ); 656 } 657 return new ast::TupleType{ std::move(tys) }; 659 658 } 660 659 } // namespace ResolvExpr
Note: See TracChangeset
for help on using the changeset viewer.