Imported Upstream version 5.4.0.167

Former-commit-id: 5624ac747d633e885131e8349322922b6a59baaa
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2017-08-21 15:34:15 +00:00
parent e49d6f06c0
commit 536cd135cc
12856 changed files with 563812 additions and 223249 deletions

View File

@ -1,4 +1,3 @@
// Compiler options: -langversion:experimental
using System;
class DeclarationExpression
@ -14,29 +13,13 @@ class DeclarationExpression
return 2;
}
Out (out int o2 = 2);
if (o2 != 3)
return 3;
Out (out var o3);
if (o3 != 3)
return 4;
Ref (ref int r = 2);
if (r != 7)
return 5;
Ref (ref ((var r2 = 3)));
if (r2 != 8)
return 6;
// Out2 (str: "b", v: out var o5);
// if (o5 != 9)
// return 7;
Out3 (out var o6 = 9m);
if (o6.GetType () != typeof (decimal))
return 8;
Out2 (str: "b", v: out var o5);
if (o5 != 9)
return 7;
Console.WriteLine ("ok");
return 0;
@ -53,14 +36,4 @@ class DeclarationExpression
v = 9;
return true;
}
static void Out3<T> (out T t)
{
t = default (T);
}
static void Ref (ref int arg)
{
arg += 5;
}
}