diff --git a/mcs/errors/dcs0206.cs b/mcs/errors/dcs0206.cs new file mode 100644 index 000000000000..2b6563c51c98 --- /dev/null +++ b/mcs/errors/dcs0206.cs @@ -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); + } +} + diff --git a/mcs/errors/dcs0308.cs b/mcs/errors/dcs0308.cs new file mode 100644 index 000000000000..0cf7cbd66215 --- /dev/null +++ b/mcs/errors/dcs0308.cs @@ -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 (d); + } +} diff --git a/mcs/errors/dcs0411.cs b/mcs/errors/dcs0411.cs new file mode 100644 index 000000000000..476a388ce462 --- /dev/null +++ b/mcs/errors/dcs0411.cs @@ -0,0 +1,15 @@ +// CS0411: The type arguments for method `C.TestCall(int)' cannot be inferred from the usage. Try specifying the type arguments explicitly +// Line: 13 + +class C +{ + static void TestCall (int i) + { + } + + public static void Main () + { + dynamic d = 0; + TestCall (d); + } +} diff --git a/mcs/errors/dcs1501-2.cs b/mcs/errors/dcs1501-2.cs new file mode 100644 index 000000000000..2055434b92bc --- /dev/null +++ b/mcs/errors/dcs1501-2.cs @@ -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; + } +} diff --git a/mcs/errors/dcs1501.cs b/mcs/errors/dcs1501.cs new file mode 100644 index 000000000000..6969803066d5 --- /dev/null +++ b/mcs/errors/dcs1501.cs @@ -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); + } +} diff --git a/mcs/errors/dcs1502.cs b/mcs/errors/dcs1502.cs new file mode 100644 index 000000000000..dd9d49d59b1e --- /dev/null +++ b/mcs/errors/dcs1502.cs @@ -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); + } +} diff --git a/mcs/errors/dcs1593.cs b/mcs/errors/dcs1593.cs new file mode 100644 index 000000000000..989ea2de6b77 --- /dev/null +++ b/mcs/errors/dcs1593.cs @@ -0,0 +1,15 @@ +// CS1593: Delegate `System.Action' does not take `2' arguments +// Line: 13 + +using System; + +public class Test +{ + public static void Main () + { + Action a = (i) => {}; + + dynamic d = 1; + a (d, true); + } +} diff --git a/mcs/errors/dcs1729.cs b/mcs/errors/dcs1729.cs new file mode 100644 index 000000000000..c05c492886d8 --- /dev/null +++ b/mcs/errors/dcs1729.cs @@ -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); + } +}