-
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
Find references, go to definition on ConditionalWeakTable.GetValue #45437
Comments
Wacky. I repro this, but cannot explain it either. Will have to debug through. |
So i have found the issue, but i cannot come up with a self-contained repro for it. Specifically, consider the following code in a .netcore 3.1 project: using System.Runtime.CompilerServices;
class c
{
private readonly ConditionalWeakTable<string, string>.CreateValueCallback s_get;
void Goo()
{
ConditionalWeakTable<string, string> s = null;
s.GetValue("", s_get); //goto-def on GetValue
}
} Setting a breakpoint here:
We see we have an IMethodSymbol for: However, if we check the following: Note that we don't do anything fancy here to get this IMethodSymbol. It's just a plain SemanticModel.GetSymbolInfo. I cannot make out why or what causes us to get teh bogus one back in the IDE. However, this ends up breaking things later on down the line for us as we end up getting confused between this type, and the equivalent type (except this time with I'll need help with this as it's unclear to me what is going on. |
Per @CyrusNajmabadi This appears to be a difference in the nullability of the original definition and this reference. Both the top-level nullability and the nullability of the type arguments differ (one is oblivious on the |
Version Used: 3.7.0-4.20323.4+11e94bdd96f1500f7762b923728e4d322a43bdc7
Steps to Reproduce:
roslyn/src/Workspaces/Core/Portable/Workspace/Workspace_Registration.cs
Line 87 in 2f626aa
Expected Behavior: It works.
Actual Behavior: I'm told there's no references.
Fun Fact: go to definition doesn't work either:
Oddly I can go to other members of ConditionalWeakTable.
The text was updated successfully, but these errors were encountered: