-
Hello everyone, Sorry if this channel is not appropriate for reporting C# compiler issue but I've no idea where to report it. I just found out an issue with C# when declaring an explicit event block and using the primary constructor in a class, as in the following example: Console.WriteLine("Hello, World!");
interface ITest
{
event Action SomeAction;
}
sealed class Test(ITest otherTest) : ITest
{
public event Action SomeAction {
add => otherTest.SomeAction += value;
remove => otherTest.SomeAction -= value;
}
} When building it with .NET 8.0.1, the build will fail with a NullReferenceException error messages. Here's a sample:
I hope this'd somehow reach the development team. Best,
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Can you report to the Roslyn repo? They deal with the implementation of the compiler. |
Beta Was this translation helpful? Give feedback.
Can you report to the Roslyn repo? They deal with the implementation of the compiler.