forked from carbon-language/carbon-lang
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Narrower check for disallowed compile time bindings.
We now allow `let` bindings in all scopes except `class` and `impl`, which are known to be problematic. This also switches to GetCurrentScopeAs instead of PeekInstId, to better encapsulate handling of invalid scope inst IDs. This fixes a fuzzer-found crash when a compile-time binding occurs inside a block (which is represented by an invalid inst ID). This partially reverts carbon-language#4338, but is consistent with @jonmeow's comments on that PR.
- Loading branch information
1 parent
55d8edc
commit 7f462bb
Showing
5 changed files
with
414 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.