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

github.com/mono/cecil.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'Mono/Type.cs')
-rw-r--r--Mono/Type.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Mono/Type.cs b/Mono/Type.cs
index 4ff2048..fd53f81 100644
--- a/Mono/Type.cs
+++ b/Mono/Type.cs
@@ -100,7 +100,8 @@ namespace Mono {
public static Type [] GetGenericArguments (this Type type)
{
#if NET_CORE
- return type.GetTypeInfo ().GenericTypeArguments;
+ var info = type.GetTypeInfo ();
+ return info.IsGenericTypeDefinition ? info.GenericTypeParameters : info.GenericTypeArguments;
#else
return type.GetGenericArguments ();
#endif