Skip to content

Commit

Permalink
New tests.
Browse files Browse the repository at this point in the history
svn path=/trunk/mcs/; revision=155255
  • Loading branch information
marek-safar committed Apr 12, 2010
2 parents 917c9ad + 5239124 commit 0417fb9
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 0 deletions.
18 changes: 18 additions & 0 deletions mcs/errors/cs0182-10.cs
@@ -0,0 +1,18 @@
// CS0182: An attribute argument must be a constant expression, typeof expression or array creation expression
// Line: 13

using System;

class TestAttribute: Attribute
{
public TestAttribute (int[][] o) {}
}

public class E
{
[Test (null)]
public static void Main ()
{
System.Reflection.MethodBase.GetCurrentMethod().GetCustomAttributes (true);
}
}
19 changes: 19 additions & 0 deletions mcs/errors/cs0182-8.cs
@@ -0,0 +1,19 @@
// CS0182: An attribute argument must be a constant expression, typeof expression or array creation expression
// Line: 13

using System;

class MyAttribute : Attribute {

public MyAttribute (string s)
{
}
}

[My (null as string)]
class X {

static void Main ()
{
}
}
18 changes: 18 additions & 0 deletions mcs/errors/cs0182-9.cs
@@ -0,0 +1,18 @@
// CS0182: An attribute argument must be a constant expression, typeof expression or array creation expression
// Line: 13

using System;

class TestAttribute: Attribute
{
public TestAttribute (object o) {}
}

public class E
{
[Test (new int[][] { null })]
public static void Main ()
{
System.Reflection.MethodBase.GetCurrentMethod().GetCustomAttributes (true);
}
}

0 comments on commit 0417fb9

Please sign in to comment.