Commit Graph

1 Commits

Author SHA1 Message Date
Slava Pestov
2fe863266c AST: Fix crashes when name lookup finds declarations outside of a protocol or extension that's nested in another type
When performing a name lookup from inside of a protocol
or extension, skip directly to the source file context
when we are done visiting the protocol or extension.

Otherwise, if we have invalid code where the protocol
or extension is nested inside another type, we might
find a member whose type contains generic parameters
of the outer type; these parameters will not resolve,
since we do not model protocols or extensions nested
inside generic contexts (yet?).

This supercedes an earlier workaround for a similar
issue; the new workaround fixes more crashes.

This is needed to avoid crasher regressions with an
upcoming patch.
2017-05-07 03:01:47 -07:00