[Mono-bugs] [Bug 82691][Wis] New - Compilation difference between .NET and Mono with generic method (apparently)
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Tue Sep 4 11:18:17 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 jeremie.laval at gmail.com.
http://bugzilla.ximian.com/show_bug.cgi?id=82691
--- shadow/82691 2007-09-04 11:18:17.000000000 -0400
+++ shadow/82691.tmp.23243 2007-09-04 11:18:17.000000000 -0400
@@ -0,0 +1,91 @@
+Bug#: 82691
+Product: Mono: Compilers
+Version: 1.2
+OS:
+OS Details: Ubuntu Linux Gutsy
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: C#
+AssignedTo: rharinath at novell.com
+ReportedBy: jeremie.laval at gmail.com
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Compilation difference between .NET and Mono with generic method (apparently)
+
+Description of Problem: The attached code snippet compiles fine under .NET
+(Windows) but fail with Mono 1.2.5 on (at least) Linux.
+
+Steps to reproduce the problem:
+1. Compile the snippet with 'gmcs /t:library Snippet.cs'
+
+Actual Results: The following internal exception :
+
+'''
+Exception caught by the compiler while compiling:
+ Block that caused the problem begin at: test.cs(5,28):
+ Block being compiled: [test.cs(6,9):,test.cs(12,9):]
+Mono.CSharp.InternalErrorException: VerifyArgumentsCompat and IsApplicable
+do not agree; likely reason: ImplicitConversion and
+ImplicitConversionExists have gone out of sync
+Interna compiler error at test.cs(5,28):: exception caught while emitting
+MethodBuilder [FuncList`1::Map]
+
+Unhandled Exception: Mono.CSharp.InternalErrorException:
+VerifyArgumentsCompat and IsApplicable do not agree; likely reason:
+ImplicitConversion and ImplicitConversionExists have gone out of sync
+ at Mono.CSharp.MethodGroupExpr.OverloadResolve (Mono.CSharp.EmitContext
+ec, System.Collections.ArrayList Arguments, Boolean may_fail, Location loc)
+[0x00000]
+ 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)
+[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)
+[0x00000]
+'''
+
+
+Expected Results: The Snippet should compiles fine (works under .NET)
+
+
+How often does this happen? : Always
+
+
+Additional Information: Here is the code snippet :
+
+'''
+using System;
+
+class FuncList<T>
+{
+ public FuncList<U> Map<U>(Converter<T, U> convert)
+ {
+ FuncList<U> result = new FuncList<U>();
+ Iter(delegate (T obj) {
+ result = convert(obj) + result;
+ });
+ return result;
+ }
+
+ public static FuncList<T> operator + (T obj, FuncList<T> rhs)
+ {
+ return rhs;
+ }
+
+ public void Iter(Action<T> action)
+ {
+
+ }
+}
+'''
More information about the mono-bugs
mailing list