-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Internal Compiler Error: NullReferenceException / NullableWalker.LocalState.SetValue for switch over bool in lambda #55227
Comments
@RikkiGibson, @333fred took a quick look and this doesn't presently repro in At least attempting to compile the sample directly doesn't produce any crashes. Did we fix something here recently or is the semantic model doing the walk in a diff way that causes the crash here? |
Good point. See: here |
Ah yes that is the trick. I really should've thought of that when I was working on the sharplab repro. |
It seems like a bitmap containing flow state wasn't initialized in whatever code path this took. I'm optimistic that if we run this in a test in debug configuration that we'll hit some assert which clues us in to the underlying problem. |
@RikkiGibson I think you are right. For me it looks like that the constructor is not called for the See: here |
…ns before the switch expression, which can cause us to "split" the state. Fixes dotnet#55227.
Version Used: 4.0.0-3.21358.10
Steps to Reproduce:
Compile / Paste the following code into the editor (reduced code):
Expected Behavior:
Compilation without error
Actual Behavior:
Compiler error NullReferenceException
Stacktrace
The text was updated successfully, but these errors were encountered: