diff options
Diffstat (limited to 'test/Mono.Linker.Tests.Cases/Attributes/OnlyKeepUsed/UnusedAttributeOnGenericParameterIsRemoved.cs')
-rw-r--r-- | test/Mono.Linker.Tests.Cases/Attributes/OnlyKeepUsed/UnusedAttributeOnGenericParameterIsRemoved.cs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/Mono.Linker.Tests.Cases/Attributes/OnlyKeepUsed/UnusedAttributeOnGenericParameterIsRemoved.cs b/test/Mono.Linker.Tests.Cases/Attributes/OnlyKeepUsed/UnusedAttributeOnGenericParameterIsRemoved.cs new file mode 100644 index 000000000..519e7e521 --- /dev/null +++ b/test/Mono.Linker.Tests.Cases/Attributes/OnlyKeepUsed/UnusedAttributeOnGenericParameterIsRemoved.cs @@ -0,0 +1,18 @@ +using Mono.Linker.Tests.Cases.Expectations.Assertions; +using Mono.Linker.Tests.Cases.Expectations.Metadata; + +namespace Mono.Linker.Tests.Cases.Attributes.OnlyKeepUsed { + [SetupLinkerArgument ("--used-attrs-only", "true")] + [Define ("IL_ASSEMBLY_AVAILABLE")] + [SetupCompileBefore ("library.dll", new [] { "Dependencies/AssemblyWithUnusedAttributeOnGenericParameter.il" })] + [RemovedTypeInAssembly ("library.dll", "Mono.Linker.Tests.Cases.Attributes.OnlyKeepUsed.Dependencies.FooAttribute")] + public class UnusedAttributeOnGenericParameterIsRemoved { + static void Main () + { +#if IL_ASSEMBLY_AVAILABLE + var tmp = new Mono.Linker.Tests.Cases.Attributes.OnlyKeepUsed.Dependencies.GenericType<int> (8).Method (); + var tmp2 = new Mono.Linker.Tests.Cases.Attributes.OnlyKeepUsed.Dependencies.TypeWithGenericMethod ().GenericMethod<int> (9); +#endif + } + } +}
\ No newline at end of file |