-
Notifications
You must be signed in to change notification settings - Fork 0
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=145520
- Loading branch information
Showing
17 changed files
with
155 additions
and
20 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,21 @@ | ||
// CS0182: An attribute argument must be a constant expression, typeof expression or array creation expression | ||
// Line: 13 | ||
|
||
using System; | ||
|
||
class AAttribute : Attribute | ||
{ | ||
public AAttribute (dynamic X) | ||
{ | ||
} | ||
} | ||
|
||
[A (Test.B)] | ||
class Test | ||
{ | ||
public static dynamic B; | ||
|
||
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
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
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,13 @@ | ||
// CS1763: The expression being assigned to optional parameter `c' must be a constant or default value | ||
// Line: 10 | ||
|
||
struct S | ||
{ | ||
} | ||
|
||
class C | ||
{ | ||
public static void Test (C c = new S ()) | ||
{ | ||
} | ||
} |
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
This file was deleted.
Oops, something went wrong.
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,17 @@ | ||
// CS1975: The constructor call cannot be dynamically dispatched within constructor initializer | ||
// Line: 14 | ||
|
||
public class A | ||
{ | ||
public A (dynamic arg) | ||
{ | ||
} | ||
} | ||
|
||
public class B : A | ||
{ | ||
public B (dynamic arg) | ||
: base (arg) | ||
{ | ||
} | ||
} |
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,14 @@ | ||
// CS1963: An expression tree cannot contain a dynamic operation | ||
// Line: 12 | ||
|
||
using System; | ||
using System.Linq.Expressions; | ||
|
||
class C | ||
{ | ||
public static void Main () | ||
{ | ||
dynamic d = 1; | ||
Expression<Func<int>> e = () => d + 1; | ||
} | ||
} |
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,11 @@ | ||
// CS1976: The method group `Main' cannot be used as an argument of dynamic operation. Consider using parentheses to invoke the method | ||
// Line: 9 | ||
|
||
class C | ||
{ | ||
public static void Main () | ||
{ | ||
dynamic d = null; | ||
d (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,11 @@ | ||
// CS1977: An anonymous method or lambda expression cannot be used as an argument of dynamic operation without a cast | ||
// Line: 9 | ||
|
||
class C | ||
{ | ||
public static void Main () | ||
{ | ||
dynamic d = null; | ||
d (delegate {}); | ||
} | ||
} |
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,11 @@ | ||
// CS1978: An expression of type `void' cannot be used as an argument of dynamic operation | ||
// Line: 9 | ||
|
||
class C | ||
{ | ||
public static void Main () | ||
{ | ||
dynamic d = null; | ||
d (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,12 @@ | ||
// CS1978: An expression of type `int*' cannot be used as an argument of dynamic operation | ||
// Line: 9 | ||
// Compiler options: -unsafe | ||
|
||
unsafe class C | ||
{ | ||
public static void Main () | ||
{ | ||
dynamic d = null; | ||
d ((int*)0); | ||
} | ||
} |
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,11 @@ | ||
// CS1978: An expression of type `__arglist' cannot be used as an argument of dynamic operation | ||
// Line: 9 | ||
|
||
class C | ||
{ | ||
public static void Main () | ||
{ | ||
dynamic d = null; | ||
d (__arglist (111)); | ||
} | ||
} |
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
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,10 @@ | ||
// CS1067: Partial declarations of `I<T>' must have the same type parameter variance modifiers | ||
// Line: 8 | ||
|
||
partial interface I<in T> | ||
{ | ||
} | ||
|
||
partial interface I<out T> | ||
{ | ||
} |
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,9 @@ | ||
// CS1750: Optional parameter expression of type `decimal' cannot be converted to parameter type `int?' | ||
// Line: 6 | ||
|
||
public class TS | ||
{ | ||
public static void Test (int? i = 1m) | ||
{ | ||
} | ||
} |
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,11 @@ | ||
// CS1770: The expression being assigned to nullable optional parameter `d' must be default value | ||
// Line: 8 | ||
|
||
using System; | ||
|
||
class C | ||
{ | ||
public static void Foo (DateTime? d = new DateTime ()) | ||
{ | ||
} | ||
} |