[Mono-bugs] [Bug 77816][Nor] Changed - r56802/r58039 brought incorrect CS0121 (anonymous method ambiguity)

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Fri Mar 17 13:19:09 EST 2006


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=77816

--- shadow/77816	2006-03-17 12:38:41.000000000 -0500
+++ shadow/77816.tmp.31763	2006-03-17 13:19:09.000000000 -0500
@@ -1,14 +1,14 @@
 Bug#: 77816
 Product: Mono: Compilers
 Version: 1.1
-OS: 
+OS: unknown
 OS Details: 
 Status: NEW   
 Resolution: 
-Severity: 
+Severity: Unknown
 Priority: Normal
 Component: C#
 AssignedTo: rharinath at novell.com                            
 ReportedBy: atsushi at ximian.com               
 QAContact: mono-bugs at ximian.com
 TargetMilestone: ---
@@ -61,6 +61,69 @@
 , so I guess every anonymous method use for ThreadStart is now broken (a
 bit of luck is that ParameterizedThreadStart is only 2.0 delegate, so it
 won't happen with mcs).
 
 Marek: can you please have a look at this one? r58038 worked fine, while
 r58039 does not.
+
+------- Additional Comments From atsushi at ximian.com  2006-03-17 13:19 -------
+Actually it might not be a bug around anonymous methods, but about
+delegate in general. The following code causes mcs crash.
+
+public class Test
+{
+        void Foo ()
+        {
+                new Test (new TestMethod (Foo));
+        }
+
+        public Test (TestMethod2 test) {}
+}
+
+public delegate void TestMethod ();
+public delegate void TestMethod2 (object o);
+
+
+Actual Results:
+
+$ mcs resolve-delegate.cs
+Exception caught by the compiler while compiling:
+   Block that caused the problem begin at: resolve-delegate.cs(3,7):
+                     Block being compiled:
+[resolve-delegate.cs(4,2):,resolve-de
+legate.cs(6,2):]
+Mono.CSharp.InternalErrorException: VerifyArgumentsCompat and
+IsApplicable do no
+t agree; likely reason: ImplicitConversion and
+ImplicitConversionExists have gon
+e out of sync
+
+Unhandled Exception: Mono.CSharp.InternalErrorException:
+VerifyArgumentsCompat a
+nd IsApplicable do not agree; likely reason: ImplicitConversion and
+ImplicitConv
+ersionExists have gone out of sync
+in <0x00ea6> Mono.CSharp.Invocation:OverloadResolve
+(Mono.CSharp.EmitContext ec,
+ Mono.CSharp.MethodGroupExpr me, System.Collections.ArrayList
+Arguments, Boolean
+ may_fail, Location loc)
+in <0x004de> Mono.CSharp.New:DoResolve (Mono.CSharp.EmitContext ec)
+in <0x000dd> Mono.CSharp.Expression:Resolve (Mono.CSharp.EmitContext
+ec, Resolve
+Flags flags)
+in <0x00010> Mono.CSharp.Expression:Resolve (Mono.CSharp.EmitContext ec)
+in <0x0000f> Mono.CSharp.ExpressionStatement:ResolveStatement
+(Mono.CSharp.EmitC
+ontext ec)
+in <0x0001f> Mono.CSharp.StatementExpression:Resolve
+(Mono.CSharp.EmitContext ec
+)
+in <0x001e2> Mono.CSharp.Block:Resolve (Mono.CSharp.EmitContext ec)
+in <0x00148> Mono.CSharp.EmitContext:ResolveTopBlock
+(Mono.CSharp.EmitContext an
+onymous_method_host, Mono.CSharp.ToplevelBlock block,
+Mono.CSharp.Parameters ip,
+ IMethodData md, System.Boolean unreachable)
+
+
+gmcs works fine here.


More information about the mono-bugs mailing list