Version Used
VS 2022 Version 17.9.7
Roslyn 4.9.0 (a98c90d)
Project info
C# 12.0
.NET 8.0
Steps to Reproduce
Consider the following scenario:
Given those types:
public abstract class BaseThing;
public sealed class DerivedThing : BaseThing;
public struct Convertible
{
public static implicit operator Convertible(BaseThing thing) => new();
}
Assume we construct a DerivedThing instance with a constructor that does not exist, causing a compiler error:
void UseConvertible(Convertible convertible) { }
void CreateUseConvertible()
{
UseConvertible(new DerivedThing(1, 2));
}
Attempt to go to the definition of DerivedThing (F12 or Ctrl+click in VS).
Expected Behavior
We are navigated to the DerivedThing declaration.
Actual Behavior
We are navigated to the implicit operator Convertible(BaseThing) declaration.