Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
svn path=/trunk/mcs/; revision=155255
- Loading branch information
Showing
3 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 () | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); | ||
} | ||
} |