Fixing a regression compiling VT arrays (#53760)
authorManish Godse <61718172+mangod9@users.noreply.github.com>
Sat, 5 Jun 2021 07:25:40 +0000 (00:25 -0700)
committerGitHub <noreply@github.com>
Sat, 5 Jun 2021 07:25:40 +0000 (00:25 -0700)
* Fixing a regression compiling VT arrays

* Update src/coreclr/tools/Common/TypeSystem/Interop/IL/MarshalHelpers.cs

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
src/coreclr/tools/Common/TypeSystem/Interop/IL/MarshalHelpers.cs

index 64ba412..458b4c6 100644 (file)
@@ -450,6 +450,9 @@ namespace Internal.TypeSystem.Interop
                 {
                     case NativeTypeKind.Array:
                         {
+                            if (isField)
+                                return MarshallerKind.Invalid;
+
                             var arrayType = (ArrayType)type;
 
                             elementMarshallerKind = GetArrayElementMarshallerKind(