[Mono-bugs] [Bug 76097][Maj] Changed - [GMCS] iterators in generic
methods
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Wed Oct 19 14:37:07 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 martin at ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=76097
--- shadow/76097 2005-10-19 14:35:16.000000000 -0400
+++ shadow/76097.tmp.1794 2005-10-19 14:37:07.000000000 -0400
@@ -135,6 +135,55 @@
from the type parameter.
------- Additional Comments From martin at ximian.com 2005-10-19 14:18 -------
So the correct fix is in TypeManager.GetNumberOfTypeArguments():
if (t.IsGenericParameter)
return 0;
+
+------- Additional Comments From martin at ximian.com 2005-10-19 14:37 -------
+I think I have an idea:
+
+=====
+(*) #0: 0x404cc329 in
+Mono.CSharp.TypeManager.GetTypeParameterConstraints(System.Type)+0x59
+at /work/gondor/mono/mcs/gmcs/generic.cs:1834
+ #1: 0x404d8b9e in
+Mono.CSharp.ConstructedType.CheckConstraint(Mono.CSharp.EmitContext,System.Type,Mono.CSharp.Expression,System.Type)+0x266
+at /work/gondor/mono/mcs/gmcs/generic.cs:1305
+ #2: 0x404b150d in
+Mono.CSharp.ConstructedType.CheckConstraints(Mono.CSharp.EmitContext,System.Int32)+0x65d
+at /work/gondor/mono/mcs/gmcs/generic.cs:1386
+ #3: 0x404b0e3b in
+Mono.CSharp.ConstructedType.CheckConstraints(Mono.CSharp.EmitContext)+0x2b
+at /work/gondor/mono/mcs/gmcs/generic.cs:1458
+ #4: 0x404a6b88 in
+Mono.CSharp.Expression.ResolveAsTypeTerminal(Mono.CSharp.EmitContext,System.Boolean)+0x1d8
+at /work/gondor/mono/mcs/gmcs/ecore.cs:272
+ #5: 0x404a69a7 in
+Mono.CSharp.Expression.ResolveAsTypeTerminal(Mono.CSharp.EmitContext)+0x27
+at /work/gondor/mono/mcs/gmcs/ecore.cs:247
+ #6: 0x404d7d36 in Mono.CSharp.Iterator.Create_Block()+0x76e at
+/work/gondor/mono/mcs/gmcs/iterators.cs:663
+ #7: 0x404d331d in Mono.CSharp.Iterator.DefineNestedTypes()+0x135
+at /work/gondor/mono/mcs/gmcs/iterators.cs:611
+ #8: 0x404a4863 in Mono.CSharp.TypeContainer.DefineType()+0x112b at
+/work/gondor/mono/mcs/gmcs/class.cs:1375
+ #9: 0x404a370d in Mono.CSharp.Class.DefineType()+0x145 at
+/work/gondor/mono/mcs/gmcs/class.cs:3179
+ #10: 0x404b3f27 in
+Mono.CSharp.TypeContainer.DoDefineMembers()+0xb4f at
+/work/gondor/mono/mcs/gmcs/class.cs:1639
+ #11: 0x404b330c in
+Mono.CSharp.TypeContainer.DefineMembers(Mono.CSharp.TypeContainer)+0x64
+at /work/gondor/mono/mcs/gmcs/class.cs:1531
+ #12: 0x404b20df in Mono.CSharp.RootContext.PopulateTypes()+0x357
+at /work/gondor/mono/mcs/gmcs/rootcontext.cs:529
+ #13: 0x40427982 in
+Mono.CSharp.Driver.MainDriver(System.String[])+0x155a at
+/work/gondor/mono/mcs/gmcs/driver.cs:1603
+ #14: 0x40017ed5 in Mono.CSharp.Driver.Main(System.String[])+0xa5
+at /work/gondor/mono/mcs/gmcs/driver.cs:287
+=====
+
+We're called from RootContext.PopulateTypes(), but still the type
+parameter's constraints are not defined yet. I believe this is some
+problem with generic methods and iterators.
More information about the mono-bugs
mailing list