diff --git a/mcs/errors/CS0103-2-lib.cs b/mcs/errors/CS0103-2-lib.cs new file mode 100644 index 000000000000..beeec82e8201 --- /dev/null +++ b/mcs/errors/CS0103-2-lib.cs @@ -0,0 +1,4 @@ +public class C +{ + int i; +} diff --git a/mcs/errors/Makefile b/mcs/errors/Makefile index 33b20aaf52b5..b35ee874367a 100644 --- a/mcs/errors/Makefile +++ b/mcs/errors/Makefile @@ -22,7 +22,7 @@ DISTFILES = \ $(wildcard known-issues-*) TEST_SUPPORT_FILES = \ - CS0118-2-lib.dll CS0122-10-lib.dll CS0122-14-lib.dll CS0122-15-lib.dll CS0122-19-lib.dll CS0144-3-lib.dll \ + CS0103-2-lib.dll CS0118-2-lib.dll CS0122-10-lib.dll CS0122-14-lib.dll CS0122-15-lib.dll CS0122-19-lib.dll CS0144-3-lib.dll \ CS0205-3-lib.dll \ CS0229-3-lib.dll CS0229-4-lib.dll \ CS0433-lib.dll CS0433-2-lib.dll \ diff --git a/mcs/errors/cs0103-2.cs b/mcs/errors/cs0103-2.cs new file mode 100644 index 000000000000..3ed7e3586c30 --- /dev/null +++ b/mcs/errors/cs0103-2.cs @@ -0,0 +1,11 @@ +// CS0103: The name `i' does not exist in the current context +// Line: 9 +// Compiler options: -r:CS0103-2-lib.dll + +class A : C +{ + void Test () + { + i = 0; + } +} diff --git a/mcs/errors/cs0426-2.cs b/mcs/errors/cs0426-2.cs new file mode 100644 index 000000000000..2d7d66a92e4e --- /dev/null +++ b/mcs/errors/cs0426-2.cs @@ -0,0 +1,14 @@ +// CS0426: The nested type `M' does not exist in the type `N' +// Line: 6 + +class A +{ + class B : N.M + { + } +} + +class N +{ + public const string S = "1"; +} diff --git a/mcs/errors/gcs0508.cs b/mcs/errors/gcs0508.cs new file mode 100644 index 000000000000..9a1552971f6e --- /dev/null +++ b/mcs/errors/gcs0508.cs @@ -0,0 +1,15 @@ +// CS0508: `A.B.getT()': return type must be `A.B' to match overridden member `A.B>.getT()' +// Line: 10 + +abstract class A +{ + public abstract T getT (); + + public class B : A + { + public override B getT () + { + return default (B); + } + } +} diff --git a/mcs/errors/gcs0854-2.cs b/mcs/errors/gcs0854-2.cs new file mode 100644 index 000000000000..0be64747e53c --- /dev/null +++ b/mcs/errors/gcs0854-2.cs @@ -0,0 +1,17 @@ +// CS0854: An expression tree cannot contain an invocation which uses optional parameter +// Line: 15 + +using System; +using System.Linq.Expressions; + +class M +{ + public M (string s = "value") + { + } + + public static void Main () + { + Expression e = () => new M (); + } +}