diff options
author | Alexander Köplinger <alex.koeplinger@outlook.com> | 2015-10-21 18:31:22 +0300 |
---|---|---|
committer | Alexander Köplinger <alex.koeplinger@outlook.com> | 2015-10-21 20:38:27 +0300 |
commit | 8421ea6a466a38490f2353187f46f17c11b18892 (patch) | |
tree | 777746c3352b24a227f17f411d5030e5b5607e2a /mcs/class/dlr | |
parent | 042ddd504c09977682bb48010c5642390826d1da (diff) |
[interpreter] Relax check for forcing compilation for built-in structs
Method calls on structs like DateTime wouldn't work before,
even though we know we don't have self mutating structs in mscorlib.
Fixes part 2 of https://bugzilla.xamarin.com/show_bug.cgi?id=34334
Diffstat (limited to 'mcs/class/dlr')
-rw-r--r-- | mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs b/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs index c58b0353f91..779d93a1086 100644 --- a/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs +++ b/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs @@ -1278,7 +1278,7 @@ namespace Microsoft.Scripting.Interpreter { // also could be a mutable value type, Delegate.CreateDelegate and MethodInfo.Invoke both can't handle this, we // need to generate code. if (!CollectionUtils.TrueForAll(parameters, (p) => !p.ParameterType.IsByRef) || - (!node.Method.IsStatic && node.Method.DeclaringType.IsValueType() && !node.Method.DeclaringType.IsPrimitive())) { + (!node.Method.IsStatic && node.Method.DeclaringType.IsValueType && node.Method.DeclaringType.Assembly != typeof (object).Assembly)) { #if MONO_INTERPRETER throw new NotImplementedException ("Interpreter of ref types"); #else |