[Mono-bugs] [Bug 76097][Maj] Changed - [GMCS] Type checker ignores generic type parameter constraint

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Wed Oct 19 07:19:21 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 atsushi at ximian.com.

http://bugzilla.ximian.com/show_bug.cgi?id=76097

--- shadow/76097	2005-10-19 04:36:10.000000000 -0400
+++ shadow/76097.tmp.29202	2005-10-19 07:19:21.000000000 -0400
@@ -76,6 +76,41 @@
 not be found (are you missing a using directive or an assembly reference?)
 
 ------- Additional Comments From sestoft at dina.kvl.dk  2005-10-19 04:36 -------
 Sorry, somehow I neglected to include this declaration:
 
   public delegate R Fun<A1,R>(A1 x);
+
+------- Additional Comments From atsushi at ximian.com  2005-10-19 07:19 -------
+Ok, now I got the exception stack trace below:
+
+Unhandled Exception: System.NotSupportedException: Operation is not
+supported.
+in <0x00014>
+System.Reflection.Emit.GenericTypeParameterBuilder:GetGenericArguments ()
+in <0x0006d> Mono.CSharp.TypeManager:GetNumberOfTypeArguments
+(System.Type t)
+in <0x0000b> Mono.CSharp.TypeManager:HasGenericArguments (System.Type t)
+in <0x00030> Mono.CSharp.ConstructedType:CheckConstraint
+(Mono.CSharp.EmitContext ec, System.Type ptype, Mono.CSharp.Expression
+expr, System.Type ctype)
+in <0x0042a> Mono.CSharp.ConstructedType:CheckConstraints
+(Mono.CSharp.EmitContext ec, Int32 index)
+in <0x00018> Mono.CSharp.ConstructedType:CheckConstraints
+(Mono.CSharp.EmitContext ec)
+in <0x00125> Mono.CSharp.Expression:ResolveAsTypeTerminal
+(Mono.CSharp.EmitContext ec, Boolean silent)
+in <0x00010> Mono.CSharp.Expression:ResolveAsTypeTerminal
+(Mono.CSharp.EmitContext ec)
+in <0x00502> Mono.CSharp.Iterator:Create_Block ()
+in <0x000dd> Mono.CSharp.Iterator:DefineNestedTypes ()
+in <0x00b48> Mono.CSharp.TypeContainer:DefineType ()
+in <0x000d8> Mono.CSharp.Class:DefineType ()
+in <0x00834> Mono.CSharp.TypeContainer:DoDefineMembers ()
+in <0x00050> Mono.CSharp.TypeContainer:DefineMembers
+(Mono.CSharp.TypeContainer container)
+in <0x0024f> Mono.CSharp.RootContext:PopulateTypes ()
+in <0x00b7b> Mono.CSharp.Driver:MainDriver (System.String[] args)
+in <0x00051> Mono.CSharp.Driver:Main (System.String[] args)
+
+Am attaching a patch that *does not* fix the bug but does fix the
+exception.


More information about the mono-bugs mailing list