Author: marek
Date: 2007-10-11 06:24:31 -0400 (Thu, 11 Oct 2007)
New Revision: 87328
Added:
trunk/mcs/errors/gcs0029-6.cs
trunk/mcs/errors/gcs1061-2.cs
trunk/mcs/errors/gcs1593.cs
trunk/mcs/errors/gcs1644-3.cs
trunk/mcs/errors/gcs1644-4.cs
trunk/mcs/errors/gcs1644-5.cs
trunk/mcs/errors/gcs1644-6.cs
trunk/mcs/errors/gcs1677.cs
trunk/mcs/errors/gcs1932.cs
Removed:
trunk/mcs/errors/gcs0201.cs
trunk/mcs/errors/gcs1031.cs
trunk/mcs/errors/gcs1526-2.cs
trunk/mcs/errors/gcs1526.cs
Modified:
trunk/mcs/errors/gcs1501.cs
Log:
New tests + updates.
Added: trunk/mcs/errors/gcs0029-6.cs
===================================================================
--- trunk/mcs/errors/gcs0029-6.cs 2007-10-11 10:22:57 UTC (rev 87327)
+++ trunk/mcs/errors/gcs0029-6.cs 2007-10-11 10:24:31 UTC (rev 87328)
@@ -0,0 +1,25 @@
+// CS0029: Cannot implicitly convert type `string' to `int'
+// Line: 28
+// Compiler options: -langversion:linq
+
+delegate string funcs (string s);
+delegate int funci (int i);
+
+class X
+{
+ static void Foo (funci fi)
+ {
+ }
+
+ static void Foo (funcs fs)
+ {
+ }
+
+ static void Main ()
+ {
+ Foo (x => {
+ int a = "a";
+ return 2;
+ });
+ }
+}
\ No newline at end of file
Property changes on: trunk/mcs/errors/gcs0029-6.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Deleted: trunk/mcs/errors/gcs0201.cs
===================================================================
--- trunk/mcs/errors/gcs0201.cs 2007-10-11 10:22:57 UTC (rev 87327)
+++ trunk/mcs/errors/gcs0201.cs 2007-10-11 10:24:31 UTC (rev 87328)
@@ -1,16 +0,0 @@
-// cs0201: Only assignment, call, increment, decrement, and new object
expressions can be used as a statement
-// Line: 14
-using System;
-
-public class Test
-{
- private class A
- {
- public string B;
- }
-
- static void Main ()
- {
- A a = new A () { B = "foo" };
- }
-}
Deleted: trunk/mcs/errors/gcs1031.cs
===================================================================
--- trunk/mcs/errors/gcs1031.cs 2007-10-11 10:22:57 UTC (rev 87327)
+++ trunk/mcs/errors/gcs1031.cs 2007-10-11 10:24:31 UTC (rev 87328)
@@ -1,11 +0,0 @@
-// CS1031: Type expected
-// Line: 9
-using System;
-
-public class Test
-{
- static void Main ()
- {
- string [] array = new [] { "Foo", "Bar", "Baz" };
- }
-}
Added: trunk/mcs/errors/gcs1061-2.cs
===================================================================
--- trunk/mcs/errors/gcs1061-2.cs 2007-10-11 10:22:57 UTC (rev 87327)
+++ trunk/mcs/errors/gcs1061-2.cs 2007-10-11 10:24:31 UTC (rev 87328)
@@ -0,0 +1,15 @@
+// CS1061: Type `string' does not contain a definition for `Length2' and no
extension method `Length2' of type `string' could be found (are you missing a
using directive or an assembly reference?)
+// Line: 12
+// Compiler options: -langversion:linq
+
+using System.Linq;
+
+public class M
+{
+ public static void Main ()
+ {
+ var e = from values in new [] { "value" }
+ let length = values.Length2
+ select length;
+ }
+}
Property changes on: trunk/mcs/errors/gcs1061-2.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/mcs/errors/gcs1501.cs
===================================================================
--- trunk/mcs/errors/gcs1501.cs 2007-10-11 10:22:57 UTC (rev 87327)
+++ trunk/mcs/errors/gcs1501.cs 2007-10-11 10:24:31 UTC (rev 87328)
@@ -1,4 +1,4 @@
-// CS1501: No overload for method `Foo' takes `1' arguments
+// CS1501: No overload for method `Foo' takes `2' arguments
// Line: 17
// Compiler options: -langversion:linq
@@ -16,4 +16,4 @@
{
1.Foo ("foo");
}
-}
\ No newline at end of file
+}
Deleted: trunk/mcs/errors/gcs1526-2.cs
===================================================================
--- trunk/mcs/errors/gcs1526-2.cs 2007-10-11 10:22:57 UTC (rev 87327)
+++ trunk/mcs/errors/gcs1526-2.cs 2007-10-11 10:24:31 UTC (rev 87328)
@@ -1,12 +0,0 @@
-// CS1526: A new expression requires () or [] after type
-// Line: 10
-using System;
-using System.Collections.Generic;
-
-public class Test
-{
- static void Main ()
- {
- List<string> list = new List<string> { "Foo", "Bar", "Baz" };
- }
-}
Deleted: trunk/mcs/errors/gcs1526.cs
===================================================================
--- trunk/mcs/errors/gcs1526.cs 2007-10-11 10:22:57 UTC (rev 87327)
+++ trunk/mcs/errors/gcs1526.cs 2007-10-11 10:24:31 UTC (rev 87328)
@@ -1,16 +0,0 @@
-// CS1526: A new expression requires () or [] after type
-// Line: 14
-using System;
-
-public class Test
-{
- private class A
- {
- public string B;
- }
-
- static void Main ()
- {
- A a = new A { B = "foo" };
- }
-}
Added: trunk/mcs/errors/gcs1593.cs
===================================================================
--- trunk/mcs/errors/gcs1593.cs 2007-10-11 10:22:57 UTC (rev 87327)
+++ trunk/mcs/errors/gcs1593.cs 2007-10-11 10:24:31 UTC (rev 87328)
@@ -0,0 +1,17 @@
+// CS1593: Delegate `System.Func<int,int>' does not take `2' arguments
+// Line: 11
+// Compiler options: -langversion:linq
+
+using System;
+
+class C
+{
+ static void Main (string [] args)
+ {
+ M ((x, y) => 2);
+ }
+
+ static void M (Func<int, int> a)
+ {
+ }
+}
Property changes on: trunk/mcs/errors/gcs1593.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/mcs/errors/gcs1644-3.cs
===================================================================
--- trunk/mcs/errors/gcs1644-3.cs 2007-10-11 10:22:57 UTC (rev 87327)
+++ trunk/mcs/errors/gcs1644-3.cs 2007-10-11 10:24:31 UTC (rev 87328)
@@ -0,0 +1,11 @@
+// CS1644: Feature `anonymous types' cannot be used because it is not part of
the C# 1.0 language specification
+// Line: 9
+// Compiler options: -langversion:ISO-1
+
+class A
+{
+ void Foo ()
+ {
+ var v = new { X = "Bar" };
+ }
+}
Property changes on: trunk/mcs/errors/gcs1644-3.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/mcs/errors/gcs1644-4.cs
===================================================================
--- trunk/mcs/errors/gcs1644-4.cs 2007-10-11 10:22:57 UTC (rev 87327)
+++ trunk/mcs/errors/gcs1644-4.cs 2007-10-11 10:24:31 UTC (rev 87328)
@@ -0,0 +1,13 @@
+// CS1644: Feature `collection initializers' cannot be used because it is not
part of the C# 2.0 language specification
+// Line: 9
+// Compiler options: -langversion:ISO-2
+
+using System.Collections.Generic;
+
+class A
+{
+ void Foo ()
+ {
+ object o = new List<int> { 1, 2, 3 };
+ }
+}
Property changes on: trunk/mcs/errors/gcs1644-4.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/mcs/errors/gcs1644-5.cs
===================================================================
--- trunk/mcs/errors/gcs1644-5.cs 2007-10-11 10:22:57 UTC (rev 87327)
+++ trunk/mcs/errors/gcs1644-5.cs 2007-10-11 10:24:31 UTC (rev 87328)
@@ -0,0 +1,16 @@
+// CS1644: Feature `object initializers' cannot be used because it is not part
of the C# 2.0 language specification
+// Line: 14
+// Compiler options: -langversion:ISO-2
+
+class Data
+{
+ public int Value;
+}
+
+class A
+{
+ void Foo ()
+ {
+ new Data () { Value = 3 };
+ }
+}
Property changes on: trunk/mcs/errors/gcs1644-5.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/mcs/errors/gcs1644-6.cs
===================================================================
--- trunk/mcs/errors/gcs1644-6.cs 2007-10-11 10:22:57 UTC (rev 87327)
+++ trunk/mcs/errors/gcs1644-6.cs 2007-10-11 10:24:31 UTC (rev 87328)
@@ -0,0 +1,8 @@
+// CS1644: Feature `implicitly typed arrays' cannot be used because it is not
part of the C# 1.0 language specification
+// Line: 7
+// Compiler options: -langversion:ISO-1
+
+class A
+{
+ string[] array = new [] { "Foo", "Bar", "Baz" };
+}
Property changes on: trunk/mcs/errors/gcs1644-6.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/mcs/errors/gcs1677.cs
===================================================================
--- trunk/mcs/errors/gcs1677.cs 2007-10-11 10:22:57 UTC (rev 87327)
+++ trunk/mcs/errors/gcs1677.cs 2007-10-11 10:24:31 UTC (rev 87328)
@@ -0,0 +1,13 @@
+// CS1677: Parameter `1' should not be declared with the `ref' keyword
+// Line: 9
+// Compiler options: -langversion:linq
+
+delegate void D (int x);
+
+class X
+{
+ static void Main ()
+ {
+ D d2 = (ref int x) => {};
+ }
+}
Property changes on: trunk/mcs/errors/gcs1677.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/mcs/errors/gcs1932.cs
===================================================================
--- trunk/mcs/errors/gcs1932.cs 2007-10-11 10:22:57 UTC (rev 87327)
+++ trunk/mcs/errors/gcs1932.cs 2007-10-11 10:24:31 UTC (rev 87328)
@@ -0,0 +1,16 @@
+// CS1932: A range variable `ii' cannot be initialized with `void'
+// Line: 13
+// Compiler options: -langversion:linq
+
+using System;
+using System.Linq;
+
+class C
+{
+ public void Foo (int i)
+ {
+ var e = from v in "a"
+ let ii = Foo (2)
+ select v;
+ }
+}
Property changes on: trunk/mcs/errors/gcs1932.cs
___________________________________________________________________
Name: svn:eol-style
+ native
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches