Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/Common/src/TypeSystem/Interop/IL/MarshalHelpers.cs')
-rw-r--r--src/Common/src/TypeSystem/Interop/IL/MarshalHelpers.cs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Common/src/TypeSystem/Interop/IL/MarshalHelpers.cs b/src/Common/src/TypeSystem/Interop/IL/MarshalHelpers.cs
index a65a6a3a6..00ba8fda5 100644
--- a/src/Common/src/TypeSystem/Interop/IL/MarshalHelpers.cs
+++ b/src/Common/src/TypeSystem/Interop/IL/MarshalHelpers.cs
@@ -66,8 +66,13 @@ namespace Internal.TypeSystem.Interop
typeDesc = typeDesc.GetParameterType();
}
- if (typeDesc.Category != TypeFlags.ValueType)
+ typeDesc = typeDesc.UnderlyingType;
+
+ // TODO: There are primitive types which require marshalling, such as bool, char.
+ if (typeDesc.IsPrimitive)
+ {
return false;
+ }
MetadataType type = typeDesc as MetadataType;
if (type == null)