diff options
-rw-r--r-- | test/Mono.Linker.Tests.Cases/Reflection/TypeUsedViaReflection.cs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/test/Mono.Linker.Tests.Cases/Reflection/TypeUsedViaReflection.cs b/test/Mono.Linker.Tests.Cases/Reflection/TypeUsedViaReflection.cs index 07a01b1ae..1937b971a 100644 --- a/test/Mono.Linker.Tests.Cases/Reflection/TypeUsedViaReflection.cs +++ b/test/Mono.Linker.Tests.Cases/Reflection/TypeUsedViaReflection.cs @@ -1,6 +1,4 @@ using System; -using System.Diagnostics; -using System.Reflection; using Mono.Linker.Tests.Cases.Expectations.Assertions; namespace Mono.Linker.Tests.Cases.Reflection { @@ -22,6 +20,7 @@ namespace Mono.Linker.Tests.Cases.Reflection { TestMultiDimensionalArrayFullString (); TestMultiDimensionalArrayAsmName (); TestDeeplyNested (); + TestTypeOf (); } [Kept] @@ -174,5 +173,14 @@ namespace Mono.Linker.Tests.Cases.Reflection { { var typeKept = Type.GetType ("Mono.Linker.Tests.Cases.Reflection.TypeUsedViaReflection+Nested1+N2+N3"); } + + [Kept] + class TypeOfToKeep { } + + [Kept] + static void TestTypeOf() + { + var typeKept = typeof(TypeOfToKeep); + } } } |