[reflection] Fix check for Type.FullName to match CoreCLR (mono/mono#18385)
authorRyan Lucia <rylucia@microsoft.com>
Wed, 8 Jan 2020 22:02:25 +0000 (17:02 -0500)
committerGitHub <noreply@github.com>
Wed, 8 Jan 2020 22:02:25 +0000 (17:02 -0500)
Updated test to follow in dotnet/runtime

Commit migrated from https://github.com/mono/mono/commit/9fd95db929a8adb9e4d41887eea77af704a1fca4

src/mono/netcore/System.Private.CoreLib/src/System/RuntimeType.Mono.cs

index e353629..e7a2bf5 100644 (file)
@@ -2485,8 +2485,9 @@ namespace System
 
                public override string? FullName {
                        get {
-                               // https://bugzilla.xamarin.com/show_bug.cgi?id=57938
-                               if (IsGenericType && ContainsGenericParameters && !IsGenericTypeDefinition)
+                               // See https://github.com/mono/mono/issues/18180 and
+                               // https://github.com/dotnet/runtime/blob/f23e2796ab5f6fea71c9fdacac024822280253db/src/coreclr/src/System.Private.CoreLib/src/System/RuntimeType.CoreCLR.cs#L1468-L1472
+                               if (ContainsGenericParameters && !GetRootElementType().IsGenericTypeDefinition)
                                        return null;
 
                                string fullName;