[Mono-bugs] [Bug 21145] Changed - Type lookup problem in delegate declaration

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
29 Mar 2002 01:39:04 -0000


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 miguel@ximian.com.

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

--- shadow/21145	Sat Mar 16 13:55:50 2002
+++ shadow/21145.tmp.7869	Thu Mar 28 20:39:04 2002
@@ -1,12 +1,12 @@
 Bug#: 21145
 Product: Mono/MCS
 Version: unspecified
 OS: unknown
 OS Details: 
-Status: NEW   
+Status: ASSIGNED   
 Resolution: 
 Severity: Unknown
 Priority: Major
 Component: Misc
 AssignedTo: mono-bugs@ximian.com                            
 ReportedBy: f_ai@hotmail.com               
@@ -40,6 +40,23 @@
 	public class A
 	{		
 	}
 	public delegate void B(object sender, N1.A a);//<- works
 	public delegate void C(object sender, A a);//<-fails
 }
+
+------- Additional Comments From miguel@ximian.com  2002-03-28 20:39 -------
+Ok, I figured out why this fails.  
+
+Basically, there are two type lookup mechanisms: one that can be used
+inside a codegeneration block (Block.EmitTopBlock) which will just
+lookup types.
+
+And another which has to lookup types and resolve the tree as it goes.
+
+The delegate case falls in the later case, and is using the former.
+
+The problem is that I have the code duplicated for classes and
+interfaces, so I am going to factor all this code into DeclSpace and
+make Delegates a DeclSpace and have them all use the same lookup code.
+
+Sorry for this thinko