File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
src/tools/illink/test/Mono.Linker.Tests.Cases/Reflection Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,8 @@ namespace Mono.Linker.Tests.Cases.Reflection
2424 class TypeMap
2525 {
2626 [ Kept ]
27- public static void Main ( string [ ] args )
27+ [ ExpectedWarning ( "IL2057" , "Unrecognized value passed to the parameter 'typeName' of method 'System.Type.GetType(String)'" ) ]
28+ public static void Main ( string [ ] args )
2829 {
2930 object t = Activator . CreateInstance ( Type . GetType ( args [ 1 ] ) ) ;
3031 if ( t is TargetAndTrimTarget ) {
@@ -37,6 +38,14 @@ public static void Main(string[] args)
3738
3839 Console . WriteLine ( TypeMapping . GetOrCreateExternalTypeMapping < UsedTypeMap > ( ) ) ;
3940 Console . WriteLine ( TypeMapping . GetOrCreateProxyTypeMapping < UsedTypeMap > ( ) ) ;
41+ Console . WriteLine ( GetExternalTypeMap < UnusedTypeMap > ( ) ) ;
42+ }
43+
44+ [ Kept ]
45+ [ ExpectedWarning ( "IL2124" , "Type 'T' must not contain signature variables to be used as a type map group." ) ]
46+ private static IReadOnlyDictionary < string , Type > GetExternalTypeMap < T > ( )
47+ {
48+ return TypeMapping . GetOrCreateExternalTypeMapping < T > ( ) ;
4049 }
4150 }
4251
You can’t perform that action at this time.
0 commit comments