Imported Upstream version 5.12.0.220

Former-commit-id: c477e03582759447177c6d4bf412cd2355aad476
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2018-04-24 09:31:23 +00:00
parent 8bd104cef2
commit 8fc30896db
1200 changed files with 29534 additions and 26161 deletions

View File

@@ -19,7 +19,8 @@ namespace Mono.Debugger.Soft
if (!type.IsEnum)
throw new ArgumentException ("type must be an enum type", "type");
TypeMirror t = type.EnumUnderlyingType;
if (value.Value == null || !value.Value.GetType ().IsPrimitive || t != vm.RootDomain.GetCorrespondingType (value.Value.GetType ()))
// Can't access t's domain, so compare type names
if (value.Value == null || !value.Value.GetType ().IsPrimitive || t.Name != vm.RootDomain.GetCorrespondingType (value.Value.GetType ()).Name)
throw new ArgumentException ("Value '" + value.Value + "' does not match the type of the enum.");
}

View File

@@ -434,6 +434,7 @@ public class Tests : TestsBase, ITest2
}
ss7 ();
ss_nested ();
ss_nested_with_two_args_wrapper ();
ss_regress_654694 ();
ss_step_through ();
ss_non_user_code ();
@@ -550,6 +551,21 @@ public class Tests : TestsBase, ITest2
ss_nested_3 ();
}
[MethodImplAttribute (MethodImplOptions.NoInlining)]
public static void ss_nested_with_two_args_wrapper () {
ss_nested_with_two_args(ss_nested_arg (), ss_nested_arg ());
}
[MethodImplAttribute (MethodImplOptions.NoInlining)]
public static int ss_nested_with_two_args (int a1, int a2) {
return a1 + a2;
}
[MethodImplAttribute (MethodImplOptions.NoInlining)]
public static int ss_nested_arg () {
return 0;
}
[MethodImplAttribute (MethodImplOptions.NoInlining)]
public static void ss_nested_1 (int i) {
}

View File

@@ -1 +1 @@
4f98dd44c4ad965aaddbb1adaa28149767c715b2
96529d5a708f73c047a79844dc5eabe9042baa22