Changeset 2fb35df


Ignore:
Timestamp:
Oct 7, 2020, 5:10:14 PM (4 years ago)
Author:
Fangren Yu <f37yu@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
41b8ea4
Parents:
31a5caba
Message:

exclude deleted declarations for assertion matching

Location:
src/ResolvExpr
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/ResolveAssertions.cc

    r31a5caba r2fb35df  
    277277                        const DeclarationWithType * candidate = cdata.id;
    278278
    279                         // build independent unification context for candidate
     279                        // ignore deleted candidates.
     280                        // NOTE: this behavior is different from main resolver.
     281                        // further investigations might be needed to determine
     282                        // if we should implement the same rule here
     283                        // (i.e. error if unique best match is deleted)
     284                        if (candidate->isDeleted) continue;
     285
     286                        // build independent unification context. for candidate
    280287                        AssertionSet have, newNeed;
    281288                        TypeEnvironment newEnv{ resn.alt.env };
  • src/ResolvExpr/SatisfyAssertions.cpp

    r31a5caba r2fb35df  
    170170                        const ast::DeclWithType * candidate = cdata.id;
    171171
     172                        // ignore deleted candidates.
     173                        // NOTE: this behavior is different from main resolver.
     174                        // further investigations might be needed to determine
     175                        // if we should implement the same rule here
     176                        // (i.e. error if unique best match is deleted)
     177                        if (candidate->isDeleted) continue;
     178
    172179                        // build independent unification context for candidate
    173180                        ast::AssertionSet have, newNeed;
Note: See TracChangeset for help on using the changeset viewer.