[mcs] Private fields of structs can have type of another private not imported type
authorMarek Safar <marek.safar@gmail.com>
Wed, 12 Mar 2014 17:24:18 +0000 (18:24 +0100)
committerMarek Safar <marek.safar@gmail.com>
Wed, 12 Mar 2014 17:28:02 +0000 (18:28 +0100)
mcs/mcs/import.cs

index 212acee844f9367e71624472f905495465e96c97..81bfc16f07494468c25222c7731a2bb460778c43 100644 (file)
@@ -190,6 +190,12 @@ namespace Mono.CSharp
 
                        try {
                                field_type = ImportType (fi.FieldType, new DynamicTypeReader (fi));
+
+                               //
+                               // Private field has private type which is not fixed buffer
+                               //
+                               if (field_type == null)
+                                       return null;
                        } catch (Exception e) {
                                // TODO: I should construct fake TypeSpec based on TypeRef signature
                                // but there is no way to do it with System.Reflection