[Mono-bugs] [Bug 41589][Nor] New - delegate constructor accepts virtual method without object reference

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
Sat, 19 Apr 2003 04:52:26 -0400 (EDT)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by vargaz@freemail.hu.

http://bugzilla.ximian.com/show_bug.cgi?id=41589

--- shadow/41589	Sat Apr 19 04:52:26 2003
+++ shadow/41589.tmp.27189	Sat Apr 19 04:52:26 2003
@@ -0,0 +1,36 @@
+Bug#: 41589
+Product: Mono/MCS
+Version: unspecified
+OS: Debian Woody
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: vargaz@freemail.hu               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: delegate constructor accepts virtual method without object reference
+
+This may be a regression:
+
+mcs should report an error 120 on the following code, but it doesn't:
+<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+using System;
+
+delegate void FooDelegate ();
+
+class A {
+
+        public virtual void foo () {
+        }
+
+        public static void Main(String[] args) {
+                FooDelegate del = new FooDelegate (A.foo);
+        }
+}
+<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<