summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Build.Tasks/NodeILExtensions.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Build.Tasks/NodeILExtensions.cs')
-rw-r--r--Xamarin.Forms.Build.Tasks/NodeILExtensions.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Xamarin.Forms.Build.Tasks/NodeILExtensions.cs b/Xamarin.Forms.Build.Tasks/NodeILExtensions.cs
index 30b01061..97b48a40 100644
--- a/Xamarin.Forms.Build.Tasks/NodeILExtensions.cs
+++ b/Xamarin.Forms.Build.Tasks/NodeILExtensions.cs
@@ -90,10 +90,11 @@ namespace Xamarin.Forms.Build.Tasks
MethodReference nullableCtor = null;
if (targetTypeRef.Resolve().FullName == "System.Nullable`1")
{
+ var nullableTypeRef = targetTypeRef;
targetTypeRef = ((GenericInstanceType)targetTypeRef).GenericArguments[0];
isNullable = true;
nullableCtor = originalTypeRef.GetMethods(md => md.IsConstructor && md.Parameters.Count == 1, module).Single().Item1;
- nullableCtor = nullableCtor.MakeGeneric(targetTypeRef);
+ nullableCtor = nullableCtor.ResolveGenericParameters(nullableTypeRef, module);
}
//Obvious Built-in conversions
if (targetTypeRef.Resolve().BaseType != null && targetTypeRef.Resolve().BaseType.FullName == "System.Enum")