diff options
author | Michal Strehovský <MichalStrehovsky@users.noreply.github.com> | 2017-05-11 05:31:06 +0300 |
---|---|---|
committer | Jan Kotas <jkotas@microsoft.com> | 2017-05-11 05:31:06 +0300 |
commit | 799569773389e67df8275642e9394350a4b4d7c6 (patch) | |
tree | d435dd95c696ccabb78ad6bb675c1e2e54878f70 /src/Common/src/TypeSystem/Ecma/EcmaType.cs | |
parent | bb756b17f92830a384ae2667055ddf170e2b25b5 (diff) |
Treat the `<Module>` type as not having a lazy constructor (#3584)
This was special cased in CorInfoImpl because that's where CoreCLR
special cases it, but the entire system should consider these not having
a lazy cctor. This cctor is triggered differently.
Noticed while working on the IL scanner. Also made this check faster
while I was at it.
Diffstat (limited to 'src/Common/src/TypeSystem/Ecma/EcmaType.cs')
-rw-r--r-- | src/Common/src/TypeSystem/Ecma/EcmaType.cs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/Common/src/TypeSystem/Ecma/EcmaType.cs b/src/Common/src/TypeSystem/Ecma/EcmaType.cs index f07856c17..0c3f0c414 100644 --- a/src/Common/src/TypeSystem/Ecma/EcmaType.cs +++ b/src/Common/src/TypeSystem/Ecma/EcmaType.cs @@ -6,6 +6,7 @@ using System; using System.Collections.Generic; using System.Reflection; using System.Reflection.Metadata; +using System.Reflection.Metadata.Ecma335; using System.Threading; using Debug = System.Diagnostics.Debug; @@ -555,6 +556,14 @@ namespace Internal.TypeSystem.Ecma } } + public override bool IsModuleType + { + get + { + return _handle.Equals(MetadataTokens.TypeDefinitionHandle(0x00000001 /* COR_GLOBAL_PARENT_TOKEN */)); + } + } + public override bool IsSealed { get |