Ignore:
Timestamp:
Apr 10, 2019, 3:15:41 PM (3 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
arm-eh, cleanup-dtors, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr
Children:
055b562
Parents:
c41c18a6
Message:

Allow merging between complete/incomplete type variables

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/Unify.cc

    rc41c18a6 r7a63486  
    172172                bool isopen2 = var2 && ( entry2 != openVars.end() );
    173173
    174                 if ( isopen1 && isopen2 && entry1->second == entry2->second ) {
    175                         result = env.bindVarToVar( var1, var2, entry1->second, needAssertions, haveAssertions, openVars, widenMode, indexer );
     174                if ( isopen1 && isopen2 ) {
     175                        if ( entry1->second.kind != entry2->second.kind ) {
     176                                result = false;
     177                        } else {
     178                                result = env.bindVarToVar(
     179                                        var1, var2, TypeDecl::Data{ entry1->second, entry2->second }, needAssertions,
     180                                        haveAssertions, openVars, widenMode, indexer );
     181                        }
    176182                } else if ( isopen1 ) {
    177183                        result = env.bindVar( var1, type2, entry1->second, needAssertions, haveAssertions, openVars, widenMode, indexer );
Note: See TracChangeset for help on using the changeset viewer.