Add warning wave for recursive generic struct #4028
Answered
by
333fred
YairHalberstadt
asked this question in
General
-
There is an existing bug in CoreCLR (not mono or CoreRT) where the following legal code throws a type load exception: static class Program
{
static void Main()
{
var m = new M();
}
}
struct N<T> { }
struct M { public N<M> E; } The bug is unlikely to be fixed any time soon. See discussion starting at dotnet/runtime#6924 (comment). I think this would be a good candidate for a warning wave so people don't accidentally write code, which whilst legal, won't actually run in the most popular runtime. |
Beta Was this translation helpful? Give feedback.
Answered by
333fred
Oct 18, 2020
Replies: 1 comment 3 replies
-
That seems like a fine thing to warn on, but should probably be raised as on issue on Roslyn instead. |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
YairHalberstadt
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
That seems like a fine thing to warn on, but should probably be raised as on issue on Roslyn instead.