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

@@ -1,5 +1,6 @@
// CS0151: A switch expression of type `S1?' cannot be converted to an integral type, bool, char, string, enum or nullable type
// Line: 24
// Line: 25
// Compiler options: -langversion:5
using System;

9
mcs/errors/cs0273-2.cs Normal file
View File

@@ -0,0 +1,9 @@
// CS0273: The accessibility modifier of the `C.S2.set' accessor must be more restrictive than the modifier of the property or indexer `C.S2'
// Line: 7
// Compiler options: -langversion:7.2
class C
{
private string S2 { get; private protected set; }
}

8
mcs/errors/cs1013-1.cs Normal file
View File

@@ -0,0 +1,8 @@
// CS1013: Invalid number
// Line : 6
class X
{
static int i = 0b;
static void Main () {}
}

7
mcs/errors/cs1013-2.cs Normal file
View File

@@ -0,0 +1,7 @@
// CS1013: Invalid number
// Line : 6
class X
{
static int i = 0x0_;
}

8
mcs/errors/cs1021-4.cs Normal file
View File

@@ -0,0 +1,8 @@
// CS1021: Integral constant is too large
// Line: 6
class X {
public static void Main() {
int h = 0b11111111111111111111111111111111111111111111111111111111111111111;
}
}

10
mcs/errors/cs1061-18.cs Normal file
View File

@@ -0,0 +1,10 @@
// CS1061: Type `int' does not contain a definition for `__0' and no extension method `__0' of type `int' could be found. Are you missing an assembly reference?
// Line: 8
static class C
{
static void Main ()
{
int c = 0.__0;
}
}

View File

@@ -1,4 +1,4 @@
// CS1527: Namespace elements cannot be explicitly declared as private, protected or protected internal
// CS1527: Namespace elements cannot be explicitly declared as private, protected, protected internal, or private protected
// Line: 4
protected interface IFoo {

View File

@@ -1,4 +1,4 @@
// CS1527: Namespace elements cannot be explicitly declared as private, protected or protected internal
// CS1527: Namespace elements cannot be explicitly declared as private, protected, protected internal, or private protected
// Line: 4
protected internal enum E {

View File

@@ -1,4 +1,5 @@
// CS1527: Namespace elements cannot be explicitly declared as private, protected or protected internal
// Line:
// CS1527: Namespace elements cannot be explicitly declared as private, protected, protected internal, or private protected
// Line: 4
private class X {
}

11
mcs/errors/cs1644-61.cs Normal file
View File

@@ -0,0 +1,11 @@
// CS1644: Feature `digit separators' cannot be used because it is not part of the C# 6.0 language specification
// Line: 9
// Compiler options: -langversion:6
class X
{
int Test ()
{
var i = 1_0;
}
}

10
mcs/errors/cs1644-62.cs Normal file
View File

@@ -0,0 +1,10 @@
// CS1644: Feature `private protected' cannot be used because it is not part of the C# 6.0 language specification
// Line: 7
// Compiler options: -langversion:6
class C
{
private protected enum E
{
}
}

View File

@@ -1,4 +1,4 @@
// CS1763: Optional parameter `o' of type `object' can only be initialized with `null'
// CS1763: Optional parameter `o' of type `object' can only be initialized with default value
// Line: 6
class C

View File

@@ -1,4 +1,4 @@
// CS1763: Optional parameter `o' of type `object' can only be initialized with `null'
// CS1763: Optional parameter `o' of type `object' can only be initialized with default value
// Line: 6
class C

13
mcs/errors/cs8326.cs Normal file
View File

@@ -0,0 +1,13 @@
// CS8326: Both ref conditional operators must be ref values
// Line: 11
class Program
{
static int x, y;
public static void Main ()
{
bool b = false;
ref int targetBucket = ref b ? x : y;
}
}

14
mcs/errors/cs8327.cs Normal file
View File

@@ -0,0 +1,14 @@
// CS8327: The ref conditional expression types `int' and `byte' have to match
// Line: 12
class Program
{
static int x;
static byte y;
public static void Main ()
{
bool b = false;
ref int targetBucket = ref b ? ref x : ref y;
}
}

View File

@@ -14,6 +14,9 @@
# Parser problems
cs0080.cs
# Undocumented switch governing rules
cs0151-4.cs NO ERROR
# Operators
cs0457-2.cs
cs0457.cs