[Mono-bugs] [Bug 82412][Cri] New - With -langversion:linq type inference crashes.

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sat Aug 11 14:06:44 EDT 2007

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 miguel at ximian.com.


--- shadow/82412	2007-08-11 14:06:44.000000000 -0400
+++ shadow/82412.tmp.3541	2007-08-11 14:06:44.000000000 -0400
@@ -0,0 +1,83 @@
+Bug#: 82412
+Product: Mono: Compilers
+Version: 1.0
+OS Details: 
+Status: NEW   
+Priority: Critical
+Component: C#
+AssignedTo: rharinath at novell.com                            
+ReportedBy: miguel at ximian.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+Summary: With -langversion:linq type inference crashes.
+The following program works with gmcs, but crashes if used with gmcs
+using System;
+class X {
+        static void SetValue<T> (object o, T x)
+        {
+        }
+        static void Main ()
+        {
+                object o = null;
+                double [] d = null;
+                SetValue (o, d);
+        }
+Am flagging the bug as critical as this blocks further work on Moonlight.
+The crash is:
+Exception caught by the compiler while compiling:
+   Block that caused the problem begin at: /tmp/ii.cs(8,21):
+                     Block being compiled: [/tmp/ii.cs(11,27):,Internal(1,1):]
+System.NotSupportedException: Operation is not supported.
+Interna compiler error at /tmp/ii.cs(8,21):: exception caught while
+emitting MethodBuilder [X::Main]
+Unhandled Exception: System.NotSupportedException: Operation is not supported.
+  at
+() [0x00000]
+  at Mono.CSharp.TypeInferenceContext.LowerBoundInference (System.Type u,
+System.Type v) [0x00000]
+  at Mono.CSharp.TypeInferenceContext.OutputTypeInference
+(Mono.CSharp.EmitContext ec, Mono.CSharp.Expression e, System.Type t) [0x00000]
+  at Mono.CSharp.TypeInferenceV3.InferInPhases (Mono.CSharp.EmitContext ec,
+Mono.CSharp.TypeInferenceContext tic, ParameterData methodParameters) [0x00000]
+  at Mono.CSharp.TypeInferenceV3.InferMethodArguments
+(Mono.CSharp.EmitContext ec, System.Reflection.MethodBase method) [0x00000]
+  at Mono.CSharp.TypeManager.InferTypeArguments (Mono.CSharp.EmitContext
+ec, System.Collections.ArrayList arguments, System.Reflection.MethodBase&
+method) [0x00000]
+  at Mono.CSharp.Invocation.IsApplicable (Mono.CSharp.EmitContext ec,
+Mono.CSharp.MethodGroupExpr me, System.Collections.ArrayList arguments,
+Int32 arg_count, System.Reflection.MethodBase& method) [0x00000]
+  at Mono.CSharp.MethodGroupExpr.OverloadResolve (Mono.CSharp.EmitContext
+ec, System.Collections.ArrayList Arguments, Boolean may_fail, Location loc)
+  at Mono.CSharp.Invocation.DoResolve (Mono.CSharp.EmitContext ec) [0x00000]
+  at Mono.CSharp.Expression.Resolve (Mono.CSharp.EmitContext ec,
+ResolveFlags flags) [0x00000]
+  at Mono.CSharp.Expression.Resolve (Mono.CSharp.EmitContext ec) [0x00000]
+  at Mono.CSharp.ExpressionStatement.ResolveStatement
+(Mono.CSharp.EmitContext ec) [0x00000]
+  at Mono.CSharp.StatementExpression.Resolve (Mono.CSharp.EmitContext ec)
+  at Mono.CSharp.Block.Resolve (Mono.CSharp.EmitContext ec) [0x00000]
+  at Mono.CSharp.Block.Resolve (Mono.CSharp.EmitContext ec) [0x00000]
+  at Mono.CSharp.EmitContext.ResolveTopBlock (Mono.CSharp.EmitContext
+anonymous_method_host, Mono.CSharp.ToplevelBlock block,
+Mono.CSharp.Parameters ip, IMethodData md, System.Boolean& unreachable)

More information about the mono-bugs mailing list