New test.
authorMarek Safar <marek.safar@gmail.com>
Fri, 1 Dec 2006 19:18:42 +0000 (19:18 -0000)
committerMarek Safar <marek.safar@gmail.com>
Fri, 1 Dec 2006 19:18:42 +0000 (19:18 -0000)
svn path=/trunk/mcs/; revision=68842

mcs/errors/Makefile
mcs/errors/cs0079-2.cs [new file with mode: 0644]

index 64545f3c80aba0ada7c2ae86547510947dea5841..16616f8ad2ba51471bd95229e5257862e1b5c627 100644 (file)
@@ -69,6 +69,7 @@ endif
 run-mcs-tests: $(TEST_SUPPORT_FILES)
 
 run-mcs-tests:
+       rm -f *.exe
        MONO_RUNTIME='$(RUNTIME)' $(TEST_RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(PROFILE)/compiler-tester.exe negative 0 $(COMPILER) known-issues-$(COMPILER_NAME) $(COMPILER_NAME).log
 
 clean-local:
diff --git a/mcs/errors/cs0079-2.cs b/mcs/errors/cs0079-2.cs
new file mode 100644 (file)
index 0000000..50c3084
--- /dev/null
@@ -0,0 +1,18 @@
+// CS0079: The event `Foo.Event2' can only appear on the left hand side of += or -=\r
+// Line: 11\r
+\r
+using System;\r
+\r
+public class Foo {\r
+       EventHandler event2;\r
+\r
+       public Foo ()\r
+       {\r
+               Event2 = null;\r
+       }\r
+\r
+       public event EventHandler Event2 {\r
+               add { event2 += value; }\r
+               remove {event2 -= value; }\r
+       }\r
+}\r