Imported Upstream version 4.2.1.36

Former-commit-id: f3008ca867fe7e4b7ae9b9a8844c0ad5798925a9
This commit is contained in:
Xamarin Public Jenkins
2015-09-24 06:06:07 -04:00
committed by Jo Shields
parent afe402035c
commit ea5caba957
172 changed files with 6570 additions and 11015 deletions

21
mcs/errors/cs0165-53.cs Normal file
View File

@@ -0,0 +1,21 @@
// CS0165: Use of unassigned local variable `v'
// Line: 19
using System;
class X
{
void Foo (out int value)
{
value = 1;
}
public static void Main ()
{
int v;
X[] x = null;
x?[0].Foo (out v);
Console.WriteLine (v);
}
}

25
mcs/errors/cs0165-54.cs Normal file
View File

@@ -0,0 +1,25 @@
// CS0165: Use of unassigned local variable `res'
// Line: 23
class A
{
public B b;
}
class B
{
public void Foo (int arg)
{
}
}
class X
{
public static void Main ()
{
A a = null;
int res;
a?.b.Foo(res = 3);
System.Console.WriteLine (res);
}
}

14
mcs/errors/cs0165-55.cs Normal file
View File

@@ -0,0 +1,14 @@
// CS0165: Use of unassigned local variable `res'
// Line: 11
class X
{
public static int Main ()
{
string[] a = null;
int res;
var m = a?[res = 3];
System.Console.WriteLine (res);
return 0;
}
}

11
mcs/errors/cs0176-8.cs Normal file
View File

@@ -0,0 +1,11 @@
// CS0176: Static member `string.Empty' cannot be accessed with an instance reference, qualify it with a type name instead
// Line: 9
class X
{
public static void Main ()
{
string y = null;
var x = y?.Empty;
}
}

13
mcs/errors/cs1503-18.cs Normal file
View File

@@ -0,0 +1,13 @@
// CS1503: Argument `#1' cannot convert `int?' expression to type `int'
// Line: 11
class X
{
public static void Main ()
{
string x = null;
string y = null;
var res = x?[y?.Length];
}
}