[Mono-bugs] [Bug 48800][Nor] New - delegate fields break compiler

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Wed, 24 Sep 2003 02:04:41 -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 mass@akuma.org.


--- shadow/48800	2003-09-24 02:04:41.000000000 -0400
+++ shadow/48800.tmp.26093	2003-09-24 02:04:41.000000000 -0400
@@ -0,0 +1,38 @@
+Bug#: 48800
+Product: Mono/MCS
+Version: unspecified
+OS: GNU/Linux [Other]
+OS Details: 
+Status: NEW   
+Priority: Normal
+Component: Misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: mass@akuma.org               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+Summary: delegate fields break compiler
+Description of Problem:
+The following code does not compile under mcs:
+class T
+	static void Main()
+	{}
+        delegate void foo (object o);
+	static foo[] f = { new foo(T.compareQueryQuery1) };
+	static void compareQueryQuery1(object o) {}
+The error appears to be in New.DoResolve - this DoResolve implementation 
+detects if the object was previously resolved, as a fix for bug #37014. 
+However, New does not return this if the object being created is a 
+delegate - it returns whatever the resolve() on NewDelegate returns on 
+first call, and a non-resolved 'this' of type New on subsequent calls.