-
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.
Showing
8 changed files
with
127 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,19 @@ | ||
// CS0206: A property, indexer or dynamic member access may not be passed as `ref' or `out' parameter | ||
// Line: 16 | ||
|
||
using System; | ||
|
||
public class Test | ||
{ | ||
public static void WriteOutData (out dynamic d) | ||
{ | ||
d = 5.0; | ||
} | ||
|
||
public static void Main (string[] args) | ||
{ | ||
dynamic d = null; | ||
WriteOutData (out d.Foo); | ||
} | ||
} | ||
|
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,15 @@ | ||
// CS0308: The non-generic method `C.TestCall(int)' cannot be used with the type arguments | ||
// Line: 13 | ||
|
||
class C | ||
{ | ||
static void TestCall (int i) | ||
{ | ||
} | ||
|
||
public static void Main () | ||
{ | ||
dynamic d = 0; | ||
TestCall<int> (d); | ||
} | ||
} |
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,15 @@ | ||
// CS0411: The type arguments for method `C.TestCall<T>(int)' cannot be inferred from the usage. Try specifying the type arguments explicitly | ||
// Line: 13 | ||
|
||
class C | ||
{ | ||
static void TestCall<T> (int i) | ||
{ | ||
} | ||
|
||
public static void Main () | ||
{ | ||
dynamic d = 0; | ||
TestCall (d); | ||
} | ||
} |
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,15 @@ | ||
// CS1501: No overload for method `this' takes `1' arguments | ||
// Line: 13 | ||
|
||
public class Blah | ||
{ | ||
int this [short id, string v] { | ||
set {} | ||
} | ||
|
||
public void Test () | ||
{ | ||
dynamic d = 1; | ||
this [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,15 @@ | ||
// CS1501: No overload for method `TestCall' takes `1' arguments | ||
// Line: 13 | ||
|
||
class C | ||
{ | ||
static void TestCall (byte b, int a) | ||
{ | ||
} | ||
|
||
public static void Main () | ||
{ | ||
dynamic d = 0; | ||
TestCall (d); | ||
} | ||
} |
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,15 @@ | ||
// CS1502: The best overloaded method match for `C.TestCall(int, string)' has some invalid arguments | ||
// Line: 13 | ||
|
||
class C | ||
{ | ||
static void TestCall (int i, string s) | ||
{ | ||
} | ||
|
||
public static void Main () | ||
{ | ||
dynamic d = 0; | ||
TestCall (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,15 @@ | ||
// CS1593: Delegate `System.Action<int>' does not take `2' arguments | ||
// Line: 13 | ||
|
||
using System; | ||
|
||
public class Test | ||
{ | ||
public static void Main () | ||
{ | ||
Action<int> a = (i) => {}; | ||
|
||
dynamic d = 1; | ||
a (d, 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,18 @@ | ||
// CS1729: The type `C' does not contain a constructor that takes `2' arguments | ||
// Line: 16 | ||
|
||
class C | ||
{ | ||
public C (int i) | ||
{ | ||
} | ||
} | ||
|
||
public class Blah | ||
{ | ||
public static void Main () | ||
{ | ||
dynamic d = 1; | ||
var r = new C (1, d); | ||
} | ||
} |