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 PROTECTED] http://bugzilla.ximian.com/show_bug.cgi?id=77963 --- shadow/77963 2006-08-02 11:13:34.000000000 -0400 +++ shadow/77963.tmp.31899 2006-09-01 20:20:18.000000000 -0400 @@ -1,22 +1,21 @@ Bug#: 77963 Product: Mono: Compilers Version: 1.1 OS: unknown OS Details: -Status: RESOLVED -Resolution: FIXED +Status: REOPENED +Resolution: Severity: Unknown Priority: Critical Component: C# AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] QAContact: [EMAIL PROTECTED] TargetMilestone: --- URL: -Cc: Summary: [GMCS] NRE on class X : Y<X.Z> - derived class of a generic type whose generic argument is its nested child class BugsThisDependsOn: 77396[FIXED], 77403 The example code below causes NullReferenceException due to incomplete type resolution. Bar is derived from a generic class whose generic argument is the nested child class of Bar (i.e. Bar.Baz). @@ -74,6 +73,67 @@ ------- Additional Comments From [EMAIL PROTECTED] 2006-07-03 08:12 ------- Increasing the priority doesn't help here - look at the dependency graph. ------- Additional Comments From [EMAIL PROTECTED] 2006-08-02 10:45 ------- Should be fixed in SVN r63251. + +------- Additional Comments From [EMAIL PROTECTED] 2006-09-01 20:20 ------- +The more generic variation of this still doesn't work (current SVN): + +public class Foo<K> +{ +} + +public class Bar<Q> : Foo<Bar<Q>.Baz> +{ + public class Baz + { + } +} + +a.cs(5,27): error CS0426: The nested type `Baz' does not exist in the +type `Bar<Q>' +Compilation failed: 1 error(s), 0 warnings + + +The similar example not involving cyclic dependency (Bar -> Foo<Baz> +-> Baz -> Bar) works fine: + +public class Foo<K> +{ +} + +public class Bar<Q> +{ + public class Baz + { + } +} + +public class Goo<Q> : Foo<Bar<Q>.Baz> +{ +} + +Closing the cycle again with: + +public class Foo<K> +{ +} + +public class Bar<Q> : Goo<Q> +{ + public class Baz + { + } +} + +public class Goo<Q> : Foo<Bar<Q>.Baz> +{ +} + +Fails again with: + +c.cs(12,27): error CS0426: The nested type `Baz' does not exist in the +type `Bar<Q>' +Compilation failed: 1 error(s), 0 warnings + _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
