Changeset 4c8621ac for src/ResolvExpr/Unify.cc
- Timestamp:
- Dec 22, 2016, 4:07:58 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:
- 1e3d5b6
- Parents:
- 907eccb
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/Unify.cc
r907eccb r4c8621ac 517 517 } // if 518 518 } // for 519 if ( list1Begin != list1End || list2Begin != list2End ) { 520 return false; 519 // if ( list1Begin != list1End || list2Begin != list2End ) { 520 // return false; 521 if ( list1Begin != list1End ) { 522 // try unifying empty tuple type with ttype 523 Type * t1 = (*list1Begin)->get_type(); 524 if ( Tuples::isTtype( t1 ) ) { 525 Type * combinedType = combineTypes( list2Begin, list2End ); 526 return unifyExact( t1, combinedType, env, needAssertions, haveAssertions, openVars, WidenMode( false, false ), indexer ); 527 } else return false; 528 } else if ( list2Begin != list2End ) { 529 // try unifying empty tuple type with ttype 530 Type * t2 = (*list2Begin)->get_type(); 531 if ( Tuples::isTtype( t2 ) ) { 532 Type * combinedType = combineTypes( list1Begin, list1End ); 533 return unifyExact( combinedType, t2, env, needAssertions, haveAssertions, openVars, WidenMode( false, false ), indexer ); 534 } else return false; 521 535 } else { 522 536 return true;
Note: See TracChangeset
for help on using the changeset viewer.