[Mono-bugs] [Bug 46804][Nor] New - Invoke cannot be called directly on a delegate

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
Wed, 23 Jul 2003 12:55:19 -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 lluis@ideary.com.

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

--- shadow/46804	Wed Jul 23 12:55:19 2003
+++ shadow/46804.tmp.27863	Wed Jul 23 12:55:19 2003
@@ -0,0 +1,51 @@
+Bug#: 46804
+Product: Mono/MCS
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: lluis@ideary.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Invoke cannot be called directly on a delegate
+
+Description of Problem:
+
+mcs should give an error when trying to call the invoke method of a 
+delegate.
+
+Steps to reproduce the problem:
+Compile this:
+
+public class TestClass
+{
+	delegate void OneDelegate (int i);
+
+	static void Main()
+	{
+		OneDelegate d = new OneDelegate (TestMethod);
+		d.Invoke (1);
+	}
+	public static void TestMethod (int i)
+	{
+	}
+}
+
+
+Actual Results:
+Compilation Succeeded
+
+Expected Results:
+error CS1533: Invoke cannot be called directly on a delegate
+
+How often does this happen? 
+Allways
+
+Additional Information: