[Mono-bugs] [Bug 75248][Wis] New - junk read by reflection for
nested generic types
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Mon Jun 13 07:26:34 EDT 2005
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 malekith at pld-linux.org.
http://bugzilla.ximian.com/show_bug.cgi?id=75248
--- shadow/75248 2005-06-13 07:26:34.000000000 -0400
+++ shadow/75248.tmp.18433 2005-06-13 07:26:34.000000000 -0400
@@ -0,0 +1,72 @@
+Bug#: 75248
+Product: Mono: Runtime
+Version: 1.1
+OS:
+OS Details: amd 64 pld linux
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: io-layer
+AssignedTo: mono-bugs at ximian.com
+ReportedBy: malekith at pld-linux.org
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: junk read by reflection for nested generic types
+
+Description of Problem:
+
+When you define a nested generic type inside another generic type, mono's
+reflection takes !1 as a reference to wrong type parameter (namely the one
+from nested class not the global class).
+
+For the following piece of Nemerle code:
+
+
+ interface IComp ['a] { }
+ class opt ['c] { }
+
+abstract class Func [p1, r]
+{
+ public apply (x : p1) : r { throw System.Exception () }
+}
+
+ class NemerleMap ['a, 'b] where 'a : IComp ['a]
+ {
+ public Find (k : 'a) : opt ['b]
+ {
+ null
+ }
+
+ public Fold['d] (y : 'a) : void
+ {
+ def x = lambda ();
+ _ = x.apply (y);
+ }
+
+ class lambda [d, aa, bb] : Func [aa, aa] where aa : IComp [aa] {
+ public apply2 (x : aa) : aa {
+ x;
+ }
+ }
+
+ }
+
+after compiling it to a dll reflection says that return type of Find is
+opt<aa> and not opt<'b>. monodis handles it right, ms.net reflection,
+peverify and ildasm are also all OK with this.
+
+Steps to reproduce the problem:
+1. untar attachment
+2. compile and run attached C# program for reading assembly
+
+Actual Results:
+opt<aa>
+
+Expected Results:
+opt<'b>
+
+Additional Information:
+I'm using svn trunk.
More information about the mono-bugs
mailing list