Imported Upstream version 3.8.0

Former-commit-id: 6a76a29bd07d86e57c6c8da45c65ed5447d38a61
This commit is contained in:
Jo Shields
2014-09-04 09:07:35 +01:00
parent a575963da9
commit fe777c5c82
1062 changed files with 12460 additions and 5983 deletions

View File

@@ -0,0 +1,26 @@
.assembly extern mscorlib
{
}
.assembly extern System.Core
{
}
.assembly extern 'CS0012-lib-missing'
{
}
.assembly 'CS0012-23-lib'
{
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module 'CS0012-23-lib.dll'
.class public abstract auto ansi sealed beforefieldinit B
extends [mscorlib]System.Object
{
.field public static valuetype ['CS0012-lib-missing']Struct`1<int32>[] ArrayMember
}

View File

@@ -21,7 +21,7 @@ DISTFILES = \
$(wildcard dlls/second/*.cs)
TEST_SUPPORT_FILES = \
CS0012-lib.dll CS0012-2-lib.dll CS0012-3-lib.dll CS0012-4-lib.dll CS0012-5-lib.dll CS0012-6-lib.dll CS0012-9-lib.dll CS0012-10-lib.dll CS0012-11-lib.dll CS0012-12-lib.dll CS0012-13-lib.dll CS0012-14-lib.dll CS0012-15-lib.dll CS0012-16-lib.dll CS0012-17-lib.dll CS0012-18-lib.dll CS0012-21-lib.dll CS0012-22-lib.dll CS0019-71-lib.dll CS0029-26-lib.dll \
CS0012-lib.dll CS0012-2-lib.dll CS0012-3-lib.dll CS0012-4-lib.dll CS0012-5-lib.dll CS0012-6-lib.dll CS0012-9-lib.dll CS0012-10-lib.dll CS0012-11-lib.dll CS0012-12-lib.dll CS0012-13-lib.dll CS0012-14-lib.dll CS0012-15-lib.dll CS0012-16-lib.dll CS0012-17-lib.dll CS0012-18-lib.dll CS0012-21-lib.dll CS0012-22-lib.dll CS0012-23-lib.dll CS0019-71-lib.dll CS0029-26-lib.dll \
CS0103-2-lib.dll CS0118-2-lib.dll CS0122-8-lib.dll CS0122-10-lib.dll CS0122-14-lib.dll CS0122-15-lib.dll CS0122-19-lib.dll CS0122-35-lib.dll CS0122-36-lib.dll CS0143-lib.dll CS0144-3-lib.dll CS0165-19-lib.dll \
CS0205-3-lib.dll CS0246-29-lib.dll CS0229-3-lib.dll CS0229-4-lib.dll CS0266-25-lib.dll \
CS0315-2-lib.dll \
@@ -32,9 +32,10 @@ TEST_SUPPORT_FILES = \
CS0730-lib.dll CS0731-1-lib.dll CS0731-2-lib.dll \
CS1070-lib.dll \
CS1540-15-lib.dll CS1540-17-lib.dll CS1542-lib.dll CS1577-lib.dll \
CS1607-3-lib.dll CS1683-lib.dll CS1684-lib.dll CS1685-2-lib.dll \
CS1683-lib.dll CS1684-lib.dll CS1685-2-lib.dll \
dlls/first/CS1701-lib.dll dlls/second/CS1701-lib.dll CS1701-lib.dll dlls/first/CS1702-lib.dll dlls/second/CS1702-lib.dll CS1702-lib.dll dlls/first/CS1705-lib.dll dlls/second/CS1705-lib.dll CS1705-lib.dll \
CS2015-lib.dll CS3005-16-lib.dll CS3013-module.dll CSExternAlias-lib.dll \
CS8009-lib.dll \
CSFriendAssembly-lib.dll \
dlls/first/CS1703-lib.dll dlls/first/CS1704-lib.dll \
dlls/second/CS1703-lib.dll dlls/second/CS1704-lib.dll

11
mcs/errors/cs0012-23.cs Normal file
View File

@@ -0,0 +1,11 @@
// CS0012: The type `Struct`1<int>' is defined in an assembly that is not referenced. Consider adding a reference to assembly `CS0012-lib-missing, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'
// Line: 9
// Compiler options: -r:CS0012-23-lib.dll
public class C
{
public static void Main ()
{
var val = B.ArrayMember;
}
}

24
mcs/errors/cs0070-2.cs Normal file
View File

@@ -0,0 +1,24 @@
// CS0070: The event `A.evt' can only appear on the left hand side of += or -= when used outside of the type `A'
// Line: 22
using System;
public static class EventExtensions
{
public static void Raise (this EventHandler h)
{
}
}
public class A
{
public event EventHandler evt;
}
public class B : A
{
public void Run()
{
Action a = () => evt.Raise ();
}
}

7
mcs/errors/cs0100-8.cs Normal file
View File

@@ -0,0 +1,7 @@
// CS100: The parameter name `obj' is a duplicate
// Line: 6
abstract class C
{
public abstract int this [object obj, object obj] => 1;
}

View File

@@ -1,11 +0,0 @@
// CS0102: The type `Part' already contains a definition for `arg'
// Line: 6
partial class Part
{
int arg;
}
partial class Part(int arg)
{
}

View File

@@ -1,4 +1,4 @@
// CS9006: An object reference is required to access primary constructor parameter `value'
// CS0103: The name `value' does not exist in the current context
// Line: 8
class X (double value)

10
mcs/errors/cs0103-14.cs Normal file
View File

@@ -0,0 +1,10 @@
// C0103: The name `s' does not exist in the current context
// Line: 7
class Test(string s)
{
public Test ()
: this (s)
{
}
}

33
mcs/errors/cs0121-25.cs Normal file
View File

@@ -0,0 +1,33 @@
// CS0121: The call is ambiguous between the following methods or properties: `A.B.X.Test(int)' and `A.C.X.Test(int)'
// Line: 31
using A.B.X;
using A.C.X;
namespace A.B
{
static class X
{
public static void Test (int o)
{
}
}
}
namespace A.C
{
static class X
{
public static int Test (int o)
{
}
}
}
class M
{
public static void Main ()
{
Test (0);
}
}

10
mcs/errors/cs0133-6.cs Normal file
View File

@@ -0,0 +1,10 @@
// CS0133: The expression being assigned to `o' must be constant
// Line: 8
class X
{
void Foo ()
{
const object o = "" ?? null;
}
}

10
mcs/errors/cs0133-7.cs Normal file
View File

@@ -0,0 +1,10 @@
// CS0133: The expression being assigned to `o' must be constant
// Line: 8
class X
{
void Foo ()
{
const object o = null ?? "";
}
}

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

@@ -0,0 +1,13 @@
// CS0136: A local variable named `arg' cannot be declared in this scope because it would give a different meaning to `arg', which is already used in a `parent or current' scope to denote something else
// Line: 11
using System;
class A (Func<int, int> barg)
{
}
class B (int arg)
: A ((arg) => 1)
{
}

13
mcs/errors/cs0136-19.cs Normal file
View File

@@ -0,0 +1,13 @@
// CS0136: A local variable named `arg' cannot be declared in this scope because it would give a different meaning to `arg', which is already used in a `parent or current' scope to denote something else
// Line: 11
using System;
partial class PC
{
Func<int, int> f = (arg) => 1;
}
partial class PC (int arg)
{
}

View File

@@ -1,5 +1,6 @@
// CS0138: `System.Console' is a type not a namespace. A using namespace directive can only be applied to namespaces
// Line: 5
// Compiler options: -langversion:5
using System;
using System.Console;

19
mcs/errors/cs0151-3.cs Normal file
View File

@@ -0,0 +1,19 @@
// CS0151: A switch expression of type `X?' cannot be converted to an integral type, bool, char, string, enum or nullable type
// Line: 15
struct X
{
public static implicit operator int (X x)
{
return 1;
}
static void Main ()
{
X? x = null;
switch (x) {
default:
break;
}
}
}

30
mcs/errors/cs0151-4.cs Normal file
View File

@@ -0,0 +1,30 @@
// CS0151: A switch expression of type `S1?' cannot be converted to an integral type, bool, char, string, enum or nullable type
// Line: 24
using System;
struct S1
{
public static implicit operator int? (S1? s)
{
throw new ApplicationException ();
}
public static implicit operator int (S1? s)
{
throw new ApplicationException ();
}
}
class C
{
public static int Main ()
{
S1? s1 = new S1 ();
switch (s1)
{
default:
return 1;
}
}
}

19
mcs/errors/cs0151-5.cs Normal file
View File

@@ -0,0 +1,19 @@
// CS0151: A switch expression of type `X?' cannot be converted to an integral type, bool, char, string, enum or nullable type
// Line: 19
struct X
{
public static implicit operator int? (X x)
{
return 1;
}
static void Main ()
{
X? x = null;
switch (x) {
default:
break;
}
}
}

View File

@@ -1,4 +1,4 @@
// CS0182: An attribute argument must be a constant expression, typeof expression or array creation expression
// CS0181: Attribute constructor parameter has type `int[][]', which is not a valid attribute parameter type
// Line: 13
using System;

View File

@@ -1,4 +1,4 @@
// CS0182: An attribute argument must be a constant expression, typeof expression or array creation expression
// CS0181: Attribute constructor parameter has type `System.Enum', which is not a valid attribute parameter type
// Line: 18
using System;

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