Imported Upstream version 5.18.0.240

Former-commit-id: 0f78a3e2ea8f270ed531f613bdd910fc196e977e
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2019-01-16 08:23:11 +00:00
parent 3b70b8a7f6
commit 1779ecf137
48 changed files with 71 additions and 40 deletions

View File

@@ -85,6 +85,31 @@ public class Tests2 {
}
}
public struct TestEnumeratorInsideGenericStruct<TKey, TValue>
{
private KeyValuePair<TKey, TValue> _bucket;
private Position _currentPosition;
internal TestEnumeratorInsideGenericStruct(KeyValuePair<TKey, TValue> bucket)
{
_bucket = bucket;
_currentPosition = Position.BeforeFirst;
}
public KeyValuePair<TKey, TValue> Current
{
get
{
if (_currentPosition == Position.BeforeFirst)
return _bucket;
return _bucket;
}
}
private enum Position
{
BeforeFirst
}
}
public struct AStruct : ITest2 {
public int i;
public string s;
@@ -384,6 +409,7 @@ public class Tests : TestsBase, ITest2
new Tests ().invoke_abort ();
new Tests ().evaluate_method ();
Bug59649 ();
inspect_enumerator_in_generic_struct();
return 3;
}
@@ -576,6 +602,11 @@ public class Tests : TestsBase, ITest2
ss_nested_with_two_args(ss_nested_arg (), ss_nested_arg ());
}
[MethodImplAttribute (MethodImplOptions.NoInlining)]
public static void inspect_enumerator_in_generic_struct() {
TestEnumeratorInsideGenericStruct<String, String> generic_struct = new TestEnumeratorInsideGenericStruct<String, String>(new KeyValuePair<string, string>("0", "f1"));
}
[MethodImplAttribute (MethodImplOptions.NoInlining)]
public static int ss_nested_with_two_args (int a1, int a2) {
return a1 + a2;

View File

@@ -1 +1 @@
7de7a22a0ef9acbae4274e23f83698cd8a31f7da
a57e595679838703ee0f1cc00d816eb02c1202dd