Closed
Description
NativeAOT compiler creates different type symbols for constructed (e.g. new MyType
) and other uses (e.g. typeof(MyType)
). It allows it to omit full vtable when the type is never constructed e.g. when the type is only used as typeof(MyType)
. These symbols are folded together near final linking phase.
Optimization introduced in dotnet/runtime#52476 will make assertion prop compare the symbols, assuming that two different symbols will have two different addresses. It is not the case for constructed and unconstructed types since they are folded together later.