Skip to content

Commit

Permalink
New tests.
Browse files Browse the repository at this point in the history
svn path=/trunk/mcs/; revision=156713
  • Loading branch information
marek-safar committed May 5, 2010
1 parent 802a9a6 commit dad1b22
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 1 deletion.
4 changes: 4 additions & 0 deletions mcs/errors/CS0103-2-lib.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
public class C
{
int i;
}
2 changes: 1 addition & 1 deletion mcs/errors/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
11 changes: 11 additions & 0 deletions mcs/errors/cs0103-2.cs
Original file line number Diff line number Diff line change
@@ -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;
}
}
14 changes: 14 additions & 0 deletions mcs/errors/cs0426-2.cs
Original file line number Diff line number Diff line change
@@ -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";
}
15 changes: 15 additions & 0 deletions mcs/errors/gcs0508.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// CS0508: `A<T>.B.getT()': return type must be `A<T>.B' to match overridden member `A<A<T>.B>.getT()'
// Line: 10

abstract class A<T>
{
public abstract T getT ();

public class B : A<B>
{
public override B getT ()
{
return default (B);
}
}
}
17 changes: 17 additions & 0 deletions mcs/errors/gcs0854-2.cs
Original file line number Diff line number Diff line change
@@ -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<Action> e = () => new M ();
}
}

0 comments on commit dad1b22

Please sign in to comment.