Commit Graph

2 Commits

Author SHA1 Message Date
Slava Pestov
3a92d2fc53 AST: Remove legacy GSB-based GenericSignature query implementation 2022-01-12 12:33:34 -05:00
Slava Pestov
f90b6054a9 AST: Make the 'decl' name lookup behavior match type resolution more closely
Extension binding and resolution of inherited protocols uses a more primitive
'declaration' based lookup that resolves a TypeRepr directly to a set of
NominalTypeDecls.

This lookup differs from type resolution in a few subtle ways, namely the
handling of ambiguity. In particular, if there are multiple declarations
with the same name, the primitive lookup returns all of them, since it
cannot perform the full ambiguity check done in type resolution, which
looks at typealias underlying types.

However, in the case where the multiple results are all nominal types, we
can definitely fail the 'decl' name lookup right away.
2021-09-06 23:35:19 -04:00