Changes in src/ResolvExpr/Unify.cc [54e41b3:d286cf68]
- File:
-
- 1 edited
-
src/ResolvExpr/Unify.cc (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/Unify.cc
r54e41b3 rd286cf68 21 21 #include <string> // for string, operator==, operator!=, bas... 22 22 #include <utility> // for pair, move 23 #include <vector> 24 25 #include "AST/Node.hpp" 26 #include "AST/Type.hpp" 23 27 24 #include "Common/PassVisitor.h" // for PassVisitor 28 25 #include "FindOpenVars.h" // for findOpenVars … … 175 172 bool isopen2 = var2 && ( entry2 != openVars.end() ); 176 173 177 if ( isopen1 && isopen2 ) { 178 if ( entry1->second.kind != entry2->second.kind ) { 179 result = false; 180 } else { 181 result = env.bindVarToVar( 182 var1, var2, TypeDecl::Data{ entry1->second, entry2->second }, needAssertions, 183 haveAssertions, openVars, widenMode, indexer ); 184 } 174 if ( isopen1 && isopen2 && entry1->second == entry2->second ) { 175 result = env.bindVarToVar( var1, var2, entry1->second, needAssertions, haveAssertions, openVars, widenMode, indexer ); 185 176 } else if ( isopen1 ) { 186 177 result = env.bindVar( var1, type2, entry1->second, needAssertions, haveAssertions, openVars, widenMode, indexer ); … … 633 624 } 634 625 626 // xxx - compute once and store in the FunctionType? 635 627 Type * extractResultType( FunctionType * function ) { 636 628 if ( function->get_returnVals().size() == 0 ) { … … 646 638 } 647 639 } 648 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) };659 }660 640 } // namespace ResolvExpr 661 641
Note:
See TracChangeset
for help on using the changeset viewer.