Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/linker.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Safar <marek.safar@gmail.com>2020-04-19 11:16:34 +0300
committerMarek Safar <marek.safar@gmail.com>2020-04-20 14:45:03 +0300
commit8fc1d252ee5727da6642f59113cd0451b5d82478 (patch)
tree3bb39acccb52e80717fc34163717698d187b13f0 /test/Mono.Linker.Tests.Cases/LinkXml/PreserveSecondLevelMethodsOfNonRequiredType.cs
parent93663d3c03256def21703e3b368557852d891934 (diff)
Handle correctly individual methods on non required types in linker
descriptor Add better code coverage for this configuration Fixes #1107
Diffstat (limited to 'test/Mono.Linker.Tests.Cases/LinkXml/PreserveSecondLevelMethodsOfNonRequiredType.cs')
-rw-r--r--test/Mono.Linker.Tests.Cases/LinkXml/PreserveSecondLevelMethodsOfNonRequiredType.cs35
1 files changed, 35 insertions, 0 deletions
diff --git a/test/Mono.Linker.Tests.Cases/LinkXml/PreserveSecondLevelMethodsOfNonRequiredType.cs b/test/Mono.Linker.Tests.Cases/LinkXml/PreserveSecondLevelMethodsOfNonRequiredType.cs
new file mode 100644
index 000000000..b795e8f24
--- /dev/null
+++ b/test/Mono.Linker.Tests.Cases/LinkXml/PreserveSecondLevelMethodsOfNonRequiredType.cs
@@ -0,0 +1,35 @@
+using System.Collections.Generic;
+using Mono.Linker.Tests.Cases.Expectations.Assertions;
+
+namespace Mono.Linker.Tests.Cases.LinkXml {
+ class PreserveSecondLevelMethodsOfNonRequiredType {
+ public static void Main ()
+ {
+ new Unused ();
+ }
+
+ [Kept]
+ class Unused
+ {
+ [Kept]
+ public Unused ()
+ {
+ }
+
+ [Kept]
+ private void PreservedMethod ()
+ {
+ new SecondLevel (2);
+ }
+ }
+
+ [Kept]
+ class SecondLevel
+ {
+ [Kept]
+ public SecondLevel (int arg)
+ {
+ }
+ }
+ }
+} \ No newline at end of file