summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Build.Tasks
diff options
context:
space:
mode:
authorStephane Delcroix <stephane@delcroix.org>2017-03-22 16:53:24 (GMT)
committerRui Marinho <me@ruimarinho.net>2017-03-22 16:55:36 (GMT)
commit9ba1eb3e2bc652d8fc7bc0e0b347303e8fa379df (patch)
treeddbf4cdb9fb1380491e863326644adbaa87a40e0 /Xamarin.Forms.Build.Tasks
parentb545d8194a3fc761b4f1c55dabe90c98ac60dff9 (diff)
downloadxamarin-forms-9ba1eb3e2bc652d8fc7bc0e0b347303e8fa379df.zip
xamarin-forms-9ba1eb3e2bc652d8fc7bc0e0b347303e8fa379df.tar.gz
xamarin-forms-9ba1eb3e2bc652d8fc7bc0e0b347303e8fa379df.tar.bz2
[XamlC] accept assignment of Object from unboxed value types in SetValue (#832)
Diffstat (limited to 'Xamarin.Forms.Build.Tasks')
-rw-r--r--Xamarin.Forms.Build.Tasks/SetPropertiesVisitor.cs4
1 files changed, 4 insertions, 0 deletions
diff --git a/Xamarin.Forms.Build.Tasks/SetPropertiesVisitor.cs b/Xamarin.Forms.Build.Tasks/SetPropertiesVisitor.cs
index 9c94daf..c93c14f 100644
--- a/Xamarin.Forms.Build.Tasks/SetPropertiesVisitor.cs
+++ b/Xamarin.Forms.Build.Tasks/SetPropertiesVisitor.cs
@@ -879,6 +879,10 @@ namespace Xamarin.Forms.Build.Tasks
if (implicitOperator != null)
return true;
+ //as we're in the SetValue Scenario, we can accept value types, they'll be boxed
+ if (varValue.VariableType.IsValueType && bpTypeRef.FullName == "System.Object")
+ return true;
+
return varValue.VariableType.InheritsFromOrImplements(bpTypeRef);
}