Reflection-annotate the ReflectObj test (#52896)
authorMichal Strehovský <MichalStrehovsky@users.noreply.github.com>
Tue, 18 May 2021 15:08:53 +0000 (17:08 +0200)
committerGitHub <noreply@github.com>
Tue, 18 May 2021 15:08:53 +0000 (08:08 -0700)
* Reflection-annotate the ReflectObj test

* Delete reflectobj.reflect.xml

src/tests/GC/Scenarios/ReflectObj/reflectobj.cs
src/tests/GC/Scenarios/ReflectObj/reflectobj.reflect.xml [deleted file]

index 0a674ea..f834083 100644 (file)
@@ -16,6 +16,7 @@
 namespace App {
     using System;
     using System.Collections.Generic;
+    using System.Diagnostics.CodeAnalysis;
     using System.Reflection;
     using System.Runtime.CompilerServices;
 
@@ -64,6 +65,7 @@ namespace App {
         class CreateObj
         {
             private Object[] v;
+            [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)]
             private Type myClass;
             private Type [] rtype;
             private ConstructorInfo CInfo;
diff --git a/src/tests/GC/Scenarios/ReflectObj/reflectobj.reflect.xml b/src/tests/GC/Scenarios/ReflectObj/reflectobj.reflect.xml
deleted file mode 100644 (file)
index 2754139..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-<linker>
-    <assembly fullname="reflectobj">
-        <type fullname="*" required="true" />
-    </assembly>
-</linker>