diff options
author | Jan Kotas <jkotas@microsoft.com> | 2017-10-20 05:01:37 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-20 05:01:37 +0300 |
commit | 256ac89fbd0c75725d285be736d9cf6c79090b65 (patch) | |
tree | 05b61e94d5e789de56193c4617a74025022f81a5 /src/ILCompiler.Compiler | |
parent | 71f8bd87bf8842b5a70398b3ed35fb6acbc91f69 (diff) | |
parent | c2fda81df1fb14ffaceac192c0a43d71cd18bd5b (diff) |
Merge pull request #4764 from dotnet/nmirror
Merge nmirror to master
Diffstat (limited to 'src/ILCompiler.Compiler')
-rw-r--r-- | src/ILCompiler.Compiler/src/Compiler/LazyGenericsPolicy.cs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/ILCompiler.Compiler/src/Compiler/LazyGenericsPolicy.cs b/src/ILCompiler.Compiler/src/Compiler/LazyGenericsPolicy.cs index 738fd18e6..5890d260e 100644 --- a/src/ILCompiler.Compiler/src/Compiler/LazyGenericsPolicy.cs +++ b/src/ILCompiler.Compiler/src/Compiler/LazyGenericsPolicy.cs @@ -17,10 +17,13 @@ namespace ILCompiler { public sealed override bool UsesLazyGenerics(MethodDesc method) { + if (UsesLazyGenerics(method.OwningType)) + return true; + if (method.HasInstantiation) return method.IsVirtual || method.HasCustomAttribute("System.Runtime.CompilerServices", "ForceLazyDictionaryAttribute"); - else - return UsesLazyGenerics(method.OwningType); + + return false; } public sealed override bool UsesLazyGenerics(TypeDesc type) |