[Mono-bugs] [Bug 21145] New - Type lookup problem in delegate declaration
27 Feb 2002 20:47:18 -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 email@example.com.
--- shadow/21145 Wed Feb 27 15:47:18 2002
+++ shadow/21145.tmp.23861 Wed Feb 27 15:47:18 2002
@@ -0,0 +1,45 @@
+Summary: Type lookup problem in delegate declaration
+Description of Problem:
+The type lookup uses Delegate.Parent as the TypeContainer (Delegate is
+not a TypeContainer like class and structs are) but this removes a full
+level of possible targets for the type search.
+More detailed information:
+By looking for the type in the Parent, the search for the type does not
+try to get 'N1'+'A' where 'A' is the type we are looking for and 'N1' is
+the namespace where the delegate is declared.
+This type lookup problem is similar to bug_21092 where the same one level
+jump is done. The difference is that 'Interface' is a 'DeclSpace' and
+this allows for a RootContext.LookupType but in the Delegate i can't find
+information that lead the type search to the correct type.
+Using snapshot of Feb-26-02
+Source code to reproduce the problem:
+ public class A
+ public delegate void B(object sender, N1.A a);//<- works
+ public delegate void C(object sender, A a);//<-fails