Imported Upstream version 4.0.0~alpha1

Former-commit-id: 806294f5ded97629b74c85c09952f2a74fe182d9
This commit is contained in:
Jo Shields
2015-04-07 09:35:12 +01:00
parent 283343f570
commit 3c1f479b9d
22469 changed files with 2931443 additions and 869343 deletions

View File

@@ -0,0 +1,4 @@
public struct S<T> where T : class
{
private T t;
}

View File

@@ -0,0 +1,64 @@
//
// The minimal mscorlib implementation
//
namespace System
{
public partial class Object {}
public partial struct Byte {}
public partial struct Int16 {}
public partial struct Int32 {}
public partial struct Int64 {}
public partial struct Single {}
public partial struct Double{}
public partial struct Char {}
public partial struct Boolean {}
public partial struct SByte {}
public partial struct UInt16 {}
public partial struct UInt32 {}
public partial struct UInt64 {}
public partial struct IntPtr {}
public partial struct UIntPtr {}
public partial struct Decimal { }
public partial class String { }
public partial class Delegate {}
public partial class MulticastDelegate {}
public partial class Array {}
public partial class Exception {}
public partial class Type {}
public partial class ValueType {}
public partial class Enum {}
public partial class Attribute {}
public partial struct Void {}
public partial class ParamArrayAttribute {}
public partial class DefaultMemberAttribute {}
public partial struct RuntimeTypeHandle {}
public partial struct RuntimeFieldHandle {}
public partial interface IDisposable {}
public delegate void Action ();
}
namespace System.Runtime.InteropServices
{
public partial class OutAttribute {}
}
namespace System.Collections
{
public partial interface IEnumerable {}
public partial interface IEnumerator {}
}
namespace System.Reflection
{
public partial class DefaultMemberAttribute {}
}
namespace System.Runtime.CompilerServices
{
public class ExtensionAttribute : Attribute {}
}

View File

@@ -2,13 +2,13 @@
{
}
.assembly 'CS1684-lib'
.assembly 'CS7069-lib'
{
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module 'CS1684-lib.dll'
.module 'CS7069-lib.dll'
.class public auto ansi beforefieldinit A
extends [mscorlib]TYWSF$

View File

@@ -22,7 +22,7 @@ DISTFILES = \
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 CS0012-23-lib.dll CS0012-24-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 \
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 CS0165-51-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 \
CS0425-7-lib.dll CS0433-lib.dll CS0433-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 \
CS1683-lib.dll CS1684-lib.dll CS1685-2-lib.dll \
CS1683-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 \
CS7069-lib.dll \
CS8009-lib.dll \
CSFriendAssembly-lib.dll \
dlls/first/CS1703-lib.dll dlls/first/CS1704-lib.dll \

12
mcs/errors/cs0029-36.cs Normal file
View File

@@ -0,0 +1,12 @@
// CS0029: Cannot implicitly convert type `void' to `object'
// Line: 10
using System;
class TestClass
{
public static void Main ()
{
Console.WriteLine ($"{ Main () }");
}
}

View File

@@ -1,5 +1,6 @@
// CS0103: The name `value' does not exist in the current context
// Line: 8
// Compiler options: -langversion:experimental
class X (double value)
{

View File

@@ -1,5 +1,6 @@
// C0103: The name `s' does not exist in the current context
// Line: 7
// Compiler options: -langversion:experimental
class Test(string s)
{

View File

@@ -1,4 +1,4 @@
// CS1001: Identifier expected
// CS0103: The name `List' does not exist in the current context
// Line: 8
class X

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

@@ -0,0 +1,10 @@
// CS0103: The name `nameof' does not exist in the current context
// Line: 8
static class C
{
static void Main ()
{
string s = nameof (nameof);
}
}

19
mcs/errors/cs0103-17.cs Normal file
View File

@@ -0,0 +1,19 @@
// CS0103: The name `Foo' does not exist in the current context
// Line: 17
using static S;
class S
{
public void Foo ()
{
}
}
class Test
{
public static void Main ()
{
Foo ();
}
}

6
mcs/errors/cs0105-4.cs Normal file
View File

@@ -0,0 +1,6 @@
// CS0105: The using directive for `System.Console' appeared previously in this namespace
// Line: 6
// Compiler options: -warnaserror -warn:3
using static System.Console;
using static System.Console;

15
mcs/errors/cs0108-20.cs Normal file
View File

@@ -0,0 +1,15 @@
// CS0108: `B.Adapter' hides inherited member `A.Adapter'. Use the new keyword if hiding was intended
// Line: 14
// Compiler options: -warnaserror -warn:2
class A
{
public abstract class Adapter
{
}
}
class B : A
{
public int Adapter { get; set; }
}

View File

@@ -1,5 +1,6 @@
// CS0111: A member `S3.S3(string)' is already defined. Rename this member or use different parameter types
// Line: 6
// Compiler options: -langversion:experimental
struct S3 (string s)
{

View File

@@ -1,5 +1,5 @@
// CS0114: `Y.XX()' hides inherited member `X.XX()'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword
// Line: 8
// Line: 10
// Compiler options: -warnaserror -warn:2
public abstract class X {

18
mcs/errors/cs0115-7.cs Normal file
View File

@@ -0,0 +1,18 @@
// CS0115: `C.P' is marked as an override but no accessible `set' accessor found to override
// Line: 11
abstract class B
{
public virtual int P {
get;
private set;
}
}
class C : B
{
public override int P {
get { return 5; }
set { }
}
}

View File

@@ -1,4 +1,4 @@
// CS0426: The nested type `WriteLINE' does not exist in the type `System.Console'
// CS0117: `System.Console' does not contain a definition for `WriteLINE'
// Line: 10
using System;

View File

@@ -1,8 +1,8 @@
// 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;
using static A.B.X;
using static A.C.X;
namespace A.B
{

43
mcs/errors/cs0121-26.cs Normal file
View File

@@ -0,0 +1,43 @@
// CS0121: The call is ambiguous between the following methods or properties: `A.B.X.Test(this int)' and `A.C.X.Test(this int)'
// Line: 37
using System;
namespace A.B
{
static class X
{
public static int Test (this int o)
{
return 1;
}
}
}
namespace A.C
{
static class X
{
public static int Test (this int o)
{
return 2;
}
}
}
namespace C
{
using A.B;
using static A.C.X;
class M
{
public static int Main ()
{
if (1.Test () != 1)
return 1;
return 0;
}
}
}

20
mcs/errors/cs0121-27.cs Normal file
View File

@@ -0,0 +1,20 @@
// CS0121: The call is ambiguous between the following methods or properties: `G<int>.Foo()' and `G<string>.Foo()'
// Line: 18
using static G<int>;
using static G<string>;
class G<T>
{
public static void Foo ()
{
}
}
class Test
{
public static void Main ()
{
Foo ();
}
}

18
mcs/errors/cs0122-37.cs Normal file
View File

@@ -0,0 +1,18 @@
// CS0122: `Test.Method' is inaccessible due to its protection level
// Line: 17
public class Test
{
protected void Method ()
{
}
private void Method (int i)
{
}
}
public class C
{
string str = nameof (Test.Method);
}

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