Weird crash on inheritance chain. CS1503

Summary

EmitException: “D:\VVVV\InheritanceCrash\callmenames-2026-04-09.vl.1.5.cs(26,181): error ()
: Argument 2: cannot convert from ‘InheritanceCrash.TestOptionProperty’ to ‘InheritanceCrash.BugEnum’”
StackTrace:
VL.Lang.Platforms.Roslyn.TargetCompilation+<>c__DisplayClass6_3 { internal System.ValueTuple<Microsoft.CodeAnalysis.PortableExecutableReference, VL.Core.RawAssembly> g__Emit|5(bool includeSource, System.Threading.CancellationToken token, VL.Lang.Platforms.Roslyn.<>c__DisplayClass6_2& ) { … } }
VL.Lang.Platforms.Roslyn.TargetCompilation+<>c__DisplayClass6_0 { internal VL.Lang.Platforms.Roslyn.ProjectCompilation g__Build|0(VL.Lang.Platforms.Roslyn.ProjectBuildRequest projectBuildRequest) { … } }
VL.Lang.Platforms.Roslyn.TargetCompilation+<>c__DisplayClass6_1+<b__1>d { private virtual void MoveNext() { … } }
System.Runtime.ExceptionServices.ExceptionDispatchInfo { public void Throw() { … } }
System.Runtime.CompilerServices.TaskAwaiter { private static void ThrowForNonSuccess(System.Threading.Tasks.Task task) { … } }
System.Runtime.CompilerServices.TaskAwaiter { private static void HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task task, System.Threading.Tasks.ConfigureAwaitOptions options) { … } }
System.Runtime.CompilerServices.TaskAwaiter1 { public TResult GetResult() { ... } } VL.Lang.Platforms.Roslyn.TargetCompilation+<InitializeAsync>d__6 { private virtual void MoveNext() { ... } } System.Runtime.ExceptionServices.ExceptionDispatchInfo { public void Throw() { ... } } System.Runtime.CompilerServices.TaskAwaiter { private static void ThrowForNonSuccess(System.Threading.Tasks.Task task) { ... } } System.Runtime.CompilerServices.TaskAwaiter { private static void HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task task, System.Threading.Tasks.ConfigureAwaitOptions options) { ... } } System.Runtime.CompilerServices.TaskAwaiter1 { public TResult GetResult() { … } }
VL.Lang.Platforms.Roslyn.TargetCompilation+d__4 { private virtual void MoveNext() { … } }
System.Runtime.ExceptionServices.ExceptionDispatchInfo { public void Throw() { … } }
System.Runtime.CompilerServices.TaskAwaiter { private static void ThrowForNonSuccess(System.Threading.Tasks.Task task) { … } }
System.Runtime.CompilerServices.TaskAwaiter { private static void HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task task, System.Threading.Tasks.ConfigureAwaitOptions options) { … } }
System.Runtime.CompilerServices.TaskAwaiter1 { public TResult GetResult() { ... } } VL.Lang.Platforms.Roslyn.TargetCompilation+<WithCompilationAsync>d__43 { private virtual void MoveNext() { ... } } System.Runtime.ExceptionServices.ExceptionDispatchInfo { public void Throw() { ... } } System.Runtime.CompilerServices.TaskAwaiter { private static void ThrowForNonSuccess(System.Threading.Tasks.Task task) { ... } } System.Runtime.CompilerServices.TaskAwaiter { private static void HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task task, System.Threading.Tasks.ConfigureAwaitOptions options) { ... } } System.Runtime.CompilerServices.TaskAwaiter1 { public TResult GetResult() { … } }
VL.Lang.Platforms.Roslyn.TargetCompilation+d__44 { private virtual void MoveNext() { … } }
System.Runtime.ExceptionServices.ExceptionDispatchInfo { public void Throw() { … } }
System.Runtime.CompilerServices.TaskAwaiter { private static void ThrowForNonSuccess(System.Threading.Tasks.Task task) { … } }
System.Runtime.CompilerServices.TaskAwaiter { private static void HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task task, System.Threading.Tasks.ConfigureAwaitOptions options) { … } }
System.Runtime.CompilerServices.TaskAwaiter`1 { public TResult GetResult() { … } }
VL.Model.VLSession+d__150 { private virtual void MoveNext() { … } }
System.Runtime.ExceptionServices.ExceptionDispatchInfo { public void Throw() { … } }
System.Runtime.CompilerServices.TaskAwaiter { private static void ThrowForNonSuccess(System.Threading.Tasks.Task task) { … } }
System.Runtime.CompilerServices.TaskAwaiter { private static void HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task task, System.Threading.Tasks.ConfigureAwaitOptions options) { … } }
VL.Model.VLSession+d__149 { private virtual void MoveNext() { … } }
System.Runtime.ExceptionServices.ExceptionDispatchInfo { public void Throw() { … } }
System.Runtime.CompilerServices.TaskAwaiter { private static void ThrowForNonSuccess(System.Threading.Tasks.Task task) { … } }
System.Runtime.CompilerServices.TaskAwaiter { private static void HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task task, System.Threading.Tasks.ConfigureAwaitOptions options) { … } }
VL.Model.VLSession+d__173 { private virtual void MoveNext() { … } }

I have an inheritance chain, and in some case it’s not resolved correctly:

public class TestOptionProperty : MyOptionProperty<BugEnum>
{
    public TestOptionProperty()
        : base(
            "Test",
            new BugOption<BugEnum> { Value = BugEnum.A },
            new List<BugOption<BugEnum>>()
        ) { }
}

I’m not sure but i think that enum is case in this case…
I did less complicated test and it’s working properly…

If i try to fix that with implicit operator i get crash deeper…

InheritanceCrash.zip (3.9 KB)

Thanks. Will be fixed in upcoming.