From 2a9ca3e2d73b66098811ac75aeb680d6c7af7d2d Mon Sep 17 00:00:00 2001 From: Marek Safar Date: Fri, 1 Dec 2006 19:18:42 +0000 Subject: [PATCH] New test. svn path=/trunk/mcs/; revision=68842 --- mcs/errors/Makefile | 1 + mcs/errors/cs0079-2.cs | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 mcs/errors/cs0079-2.cs diff --git a/mcs/errors/Makefile b/mcs/errors/Makefile index 64545f3c80a..16616f8ad2b 100644 --- a/mcs/errors/Makefile +++ b/mcs/errors/Makefile @@ -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 index 00000000000..50c30845c8e --- /dev/null +++ b/mcs/errors/cs0079-2.cs @@ -0,0 +1,18 @@ +// CS0079: The event `Foo.Event2' can only appear on the left hand side of += or -= +// Line: 11 + +using System; + +public class Foo { + EventHandler event2; + + public Foo () + { + Event2 = null; + } + + public event EventHandler Event2 { + add { event2 += value; } + remove {event2 -= value; } + } +} -- 2.25.1