Full issue information + repro project:
https://github.com/just-ero/roslyn-issues-repros/tree/main/4.14.0/006_GoToDefinition_ImplicitConversion_ErrorInCtor
Version
Roslyn: 4.14.0-2.25120.5 (882e679)
Steps to Reproduce
- Add the following code wherever syntactically applicable:
record R(int I);
class C
{
public C Repro()
{
M(new R(1u));
return new R(1u);
}
public static void M(C c) { }
public static implicit operator C(R r) => throw null;
}
- Use "Go to definition" on the two instantiations of
R.
Expected Behavior
"Go to definition" should navigate to R.
Actual Behavior
It navigates to the implicit operator on C.