Merge branch 'upstream'

Former-commit-id: 459eaaa61075e30f60346bd93ea687d2be96520f
This commit is contained in:
Xamarin Public Jenkins (auto-signing) 2018-06-20 08:28:47 +00:00
commit c38490cd13
40 changed files with 113 additions and 37 deletions

View File

@ -1 +1 @@
cab2a3ba1d347f7b903e9002f483aab13a5f6262
89c8ccc926a20e76b6d843afaa322fe7afdc6867

View File

@ -1 +1 @@
29ff151aff4578c2f4f9911b05e8ef2b9d88bfa7
bc54f17e2eb5b0b17216ec2f470e310a41ada7b2

View File

@ -34,7 +34,7 @@ static class Consts
// Use these assembly version constants to make code more maintainable.
//
public const string MonoVersion = "5.14.0.136";
public const string MonoVersion = "5.14.0.139";
public const string MonoCompany = "Mono development team";
public const string MonoProduct = "Mono Common Language Infrastructure";
public const string MonoCopyright = "(c) Various Mono authors";

View File

@ -172,7 +172,7 @@ namespace System.Reflection.Emit {
CreateDynMethod ();
deleg = Delegate.CreateDelegate (delegateType, this);
deleg = Delegate.CreateDelegate (delegateType, null, this);
return deleg;
}

View File

@ -744,6 +744,55 @@ namespace MonoTests.System.Reflection.Emit
Assert.AreEqual (typeof (TypedRefTarget), TypedReference.GetTargetType (tr));
}
#endif
static Action GenerateProblematicMethod (bool add_extra, bool mismatch = false, bool use_vts = false)
{
Type this_type = typeof(object);
Type bound_type = typeof(object);
if (mismatch) {
this_type = typeof (string);
bound_type = typeof (DynamicMethodTest);
} else if (use_vts) {
this_type = typeof (int);
bound_type = typeof (long);
}
Type[] args;
if (add_extra)
args = new[] { this_type };
else
args = new Type [0];
var mb = new DynamicMethod("Peek", null, args, bound_type, true);
var il = mb.GetILGenerator ();
il.Emit(OpCodes.Ret);
return (Action) mb.CreateDelegate(typeof(Action));
}
[Test]
public void ExtraArgGetsIgnored ()
{
GenerateProblematicMethod (true) ();
}
[Test]
public void ExactNumberOfArgsWork ()
{
GenerateProblematicMethod (false) ();
}
[Test]
public void ExtraArgWithMismatchedTypes ()
{
GenerateProblematicMethod (true, mismatch: true) ();
}
[Test]
[ExpectedException (typeof (ArgumentException))]
public void ExtraArgWithValueType ()
{
GenerateProblematicMethod (true, use_vts: true) ();
}
}
}

View File

@ -1 +1 @@
9bc5ab623e915f2b061bb11931e858e323d28b81
7cf6299f6f67f965e15bdd8ed523ffd6bcfa90fa

View File

@ -1 +1 @@
81704786f614b9566b068099243cbbcec5e01431
1d1b84a3ab81fa4a1113386171175288b709d825

View File

@ -1 +1 @@
87d7ee9183655cd6dd498ab61f9f538047e37154
c41bcabda2db97799bd15972d5ef027ed96e13e4

View File

@ -1 +1 @@
4adc4d0533a38214b4b7bf8f3c11b82eb6788344
2fd9c7b9ba1d6ff75925b7280ae014359cee081d

View File

@ -1 +1 @@
0ad035417f81239130a7a6ee40c9976ca253b0b0
6655dcd3a1b322285a016ceb910942baf10bff4c

View File

@ -1 +1 @@
5cc86fb9eeda0070628ec28fbba5a3f73164ee2d
f1a773b76dd88599b9e97be795b4d8631972874e

View File

@ -1 +1 @@
d896a1a2344d8d2e024c8ef3e88be8eb02613d26
a0da33ba266c13c6e340af0c0b367682fd1ed2a8

View File

@ -1 +1 @@
9bc5ab623e915f2b061bb11931e858e323d28b81
7cf6299f6f67f965e15bdd8ed523ffd6bcfa90fa

View File

@ -1 +1 @@
81704786f614b9566b068099243cbbcec5e01431
1d1b84a3ab81fa4a1113386171175288b709d825

View File

@ -1 +1 @@
87d7ee9183655cd6dd498ab61f9f538047e37154
c41bcabda2db97799bd15972d5ef027ed96e13e4

View File

@ -1 +1 @@
4adc4d0533a38214b4b7bf8f3c11b82eb6788344
2fd9c7b9ba1d6ff75925b7280ae014359cee081d

View File

@ -1 +1 @@
0ad035417f81239130a7a6ee40c9976ca253b0b0
6655dcd3a1b322285a016ceb910942baf10bff4c

View File

@ -1 +1 @@
5cc86fb9eeda0070628ec28fbba5a3f73164ee2d
f1a773b76dd88599b9e97be795b4d8631972874e

View File

@ -1 +1 @@
d896a1a2344d8d2e024c8ef3e88be8eb02613d26
a0da33ba266c13c6e340af0c0b367682fd1ed2a8

View File

@ -1 +1 @@
9bc5ab623e915f2b061bb11931e858e323d28b81
7cf6299f6f67f965e15bdd8ed523ffd6bcfa90fa

Some files were not shown because too many files have changed in this diff Show More