Why is there a set of static constructors in ITypeSymbol instead of one?
2 answers
My guess: partial classes.
public partial class Foo
{
static Foo() {}
}
public partial class Foo
{
static Foo() {}
}
Even though this invalid code (which I previously forgot) may need to be represented in the Roslyn object model. If you can get ITypeSymbol
for Foo
while this code is compiling, you can find both static constructors there.
+3
source to share