-
Hello, static class foo
{
protected void doThing() // CS1057
{
}
} This code generates the CS1057 compiler error, as static classes don’t support inheritance. So why is the following allowed? static class foo
{
protected struct bar
{
}
} |
Beta Was this translation helpful? Give feedback.
Answered by
svick
Oct 10, 2021
Replies: 1 comment 2 replies
-
Looking at the relevant code in the compiler, this seems to be a bug that was intentionally preserved from the previous version of the compiler to maintain compatibility. |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
5cover
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Looking at the relevant code in the compiler, this seems to be a bug that was intentionally preserved from the previous version of the compiler to maintain compatibility.