Files
carbon-lang/toolchain/check/testdata/interface
Richard Smith 6bc36b045f Rearrange name poisoning logic to do a little less work. (#4766)
Insert the poison at the same time we do the name lookup to avoid doing
two hash table lookups into each scope. This adds a bit of complication
because import logic now needs to cope with importing a name that is
already poisoned, but the complexity seems worthwhile to reduce the
number of name lookups performed.

This incidentally fixes a bug where we wouldn't poison any name scopes
if we found the name in an enclosing lexical scope, leading to one extra
diagnostic in existing tests.

Part of #4622
2025-01-14 17:34:33 +00:00
..