Forráskód Böngészése

new error tests

svn path=/trunk/mcs/; revision=42096
Marek Safar 21 éve
szülő
commit
fd45e86ed9

+ 12 - 0
mcs/errors/cs1717-2.cs

@@ -0,0 +1,12 @@
+// cs1717.cs: Assignment made to same variable; did you mean to assign something else?
+// Line: 9
+// Compiler options: -warnaserror -warn:3
+
+class A
+{    
+    void B ()
+    {
+	int l = 3;
+	l = l;
+    }
+}

+ 13 - 0
mcs/errors/cs1717-3.cs

@@ -0,0 +1,13 @@
+// cs1717.cs: Assignment made to same variable; did you mean to assign something else?
+// Line: 9
+// Compiler options: -warnaserror -warn:3
+
+class A
+{    
+    int i;
+    
+    void C ()
+    {
+	i = i;
+    }
+}

+ 13 - 0
mcs/errors/cs1717-4.cs

@@ -0,0 +1,13 @@
+// cs1717.cs: Assignment made to same variable; did you mean to assign something else?
+// Line: 9
+// Compiler options: -warnaserror -warn:3
+
+class A
+{    
+    static int Value;
+    
+    void D ()
+    {
+	A.Value = Value;
+    }
+}

+ 11 - 0
mcs/errors/cs1717.cs

@@ -0,0 +1,11 @@
+// cs1717.cs: Assignment made to same variable; did you mean to assign something else?
+// Line: 9
+// Compiler options: -warnaserror -warn:3
+
+class A
+{    
+    public A (int a)
+    {
+	a = a;
+    }
+}

+ 4 - 0
mcs/errors/gmcs-expect-wrong-error

@@ -127,5 +127,9 @@ cs1677-2.cs
 cs1677.cs
 cs1708.cs
 cs1715.cs
+cs1717.cs
+cs1717-2.cs
+cs1717-3.cs
+cs1717-4.cs
 cs2007.cs
 cs3003-5.cs