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-09-01 23:22:14.000000000 -0400 +++ shadow/77963.tmp.3137 2006-09-02 21:01:11.000000000 -0400 @@ -159,6 +159,42 @@ ------- Additional Comments From [EMAIL PROTECTED] 2006-09-01 23:22 ------- Created an attachment (id=17585) Fix for the case of nested type inside generic type + +------- Additional Comments From [EMAIL PROTECTED] 2006-09-02 21:01 ------- +My patch still doesn't work when constraints are added to the Bar<Q>, +e.g.: + +public class Foo<K> +{ +} + +public class Bar<Q> : Foo<Bar<Q>.Baz> + where Q : System.IEquatable<Q> +{ + public class Baz + { + } +} + +Unhandled Exception: System.NullReferenceException: Object reference +not set to an instance of an object + at Mono.CSharp.Constraints.ResolveTypes (IResolveContext ec) [0x00000] + at Mono.CSharp.TypeParameter.ResolveType (IResolveContext ec) [0x00000] + at Mono.CSharp.TypeParameter.DefineType (IResolveContext ec, +System.Reflection.Emit.MethodBuilder builder, +System.Reflection.MethodInfo implementing, Boolean is_override) [0x00000] + at Mono.CSharp.TypeParameter.DefineType (IResolveContext ec) [0x00000] + at Mono.CSharp.TypeContainer.ResolveType () [0x00000] + at Mono.CSharp.RootContext.PopulateTypes () [0x00000] + at Mono.CSharp.Driver.MainDriver (System.String[] args) [0x00000] + at Mono.CSharp.Driver.Main (System.String[] args) [0x00000] + + +Seems like ResolveTypes() was called before Resolve(). A quick hack +"if(!resolved) Resolve();" in the begin of ResolveTypes() appears to +work. When this is fixed the correct way, I would propose adding +assertions to such places. + _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
