-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Fixing VS Crash on invalid "MemberNotNull" #45563
Changes from all commits
04e3eaf
9c34ce6
557e729
622988f
faa2e58
318370e
d441b98
1be5cf7
cbb2b44
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -715,6 +715,10 @@ int getSlotForFieldOrProperty(Symbol member) | |
|
||
if (!isStatic) | ||
{ | ||
if (MethodThisParameter is null) | ||
{ | ||
return -1; | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: newline |
||
thisSlot = GetOrCreateSlot(MethodThisParameter); | ||
if (thisSlot < 0) | ||
{ | ||
|
@@ -1268,6 +1272,7 @@ static MethodSymbol getTopLevelMethod(MethodSymbol method) | |
} | ||
} | ||
|
||
#nullable enable | ||
protected override int GetOrCreateSlot(Symbol symbol, int containingSlot = 0, bool forceSlotEvenIfEmpty = false) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If it's possible for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't be possible, added an Assert to make sure in Commit 8. In reply to: 447978511 [](ancestors = 447978511) |
||
{ | ||
|
||
|
@@ -1276,6 +1281,7 @@ protected override int GetOrCreateSlot(Symbol symbol, int containingSlot = 0, bo | |
|
||
return base.GetOrCreateSlot(symbol, containingSlot, forceSlotEvenIfEmpty); | ||
} | ||
#nullable restore | ||
|
||
private void VisitAndUnsplitAll<T>(ImmutableArray<T> nodes) where T : BoundNode | ||
{ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the
Kind
of the member in this scenario? #Closed