[Mono-bugs] [Bug 77822][Min] New - r57750 brought compiler crash on resolving overload of delegates.

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Fri Mar 17 15:47:30 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=77822

--- shadow/77822	2006-03-17 15:47:30.000000000 -0500
+++ shadow/77822.tmp.1084	2006-03-17 15:47:30.000000000 -0500
@@ -0,0 +1,90 @@
+Bug#: 77822
+Product: Mono: Compilers
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Minor
+Component: C#
+AssignedTo: marek.safar at seznam.cz                            
+ReportedBy: atsushi at ximian.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: r57750 brought compiler crash on resolving overload of delegates.
+
+It is copied from bug #77816, which was originally thought as relevant bug
+but turned out different.
+
+The following code causes compiler 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:
+
+$ mono --debug  ../../svn/mcs/mcs/mcs.exe 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-delegate.cs(6,2):]
+Mono.CSharp.InternalErrorException: VerifyArgumentsCompat and IsApplicable
+do not agree; likely reason: ImplicitConversion and
+ImplicitConversionExists have gone out of sync
+
+Unhandled Exception: Mono.CSharp.InternalErrorException:
+VerifyArgumentsCompat and IsApplicable do not agree; likely reason:
+ImplicitConversion and ImplicitConv
+ersionExists have gone out of sync
+in [0x00567] Mono.CSharp.Invocation:OverloadResolve
+(Mono.CSharp.EmitContext ec,
+ Mono.CSharp.MethodGroupExpr me, System.Collections.ArrayList Arguments,
+Boolean may_fail, Location loc)
+in [0x0029f] (at C:\cygwin\home\atsushi\svn\mcs\mcs\expression.cs:5730)
+Mono.CSharp.New:DoResolve (Mono.CSharp.EmitContext ec)
+in [0x00068] (at C:\cygwin\home\atsushi\svn\mcs\mcs\ecore.cs:391)
+Mono.CSharp.Expression:Resolve (Mono.CSharp.EmitContext ec, ResolveFlags flags)
+in [0x00003] (at C:\cygwin\home\atsushi\svn\mcs\mcs\ecore.cs:419)
+Mono.CSharp.Expression:Resolve (Mono.CSharp.EmitContext ec)
+in [0x00002] (at C:\cygwin\home\atsushi\svn\mcs\mcs\ecore.cs:1114)
+Mono.CSharp.ExpressionStatement:ResolveStatement (Mono.CSharp.EmitContext ec)
+in [0x00014] (at C:\cygwin\home\atsushi\svn\mcs\mcs\statement.cs:531)
+Mono.CSharp.StatementExpression:Resolve (Mono.CSharp.EmitContext ec)
+in [0x000e3] (at C:\cygwin\home\atsushi\svn\mcs\mcs\statement.cs:1926)
+Mono.CSharp.Block:Resolve (Mono.CSharp.EmitContext ec)
+in [0x0009a] (at C:\cygwin\home\atsushi\svn\mcs\mcs\codegen.cs:664)
+Mono.CSharp.EmitContext:ResolveTopBlock (Mono.CSharp.EmitContext
+anonymous_method_host, Mono.CSharp.ToplevelBlock block,
+Mono.CSharp.Parameters ip, IMethodData md, System.Boolean unreachable)
+
+
+Expected Results:
+
+$ mono --debug  ../../svn/mcs/mcs/mcs.exe resolve-delegate.cs
+resolve-delegate.cs(5,3): error CS1502: The best overloaded method match
+for `Test.Test(TestMethod2)' has some invalid arguments
+resolve-delegate.cs(5,3): error CS1503: Argument 1: Cannot convert from
+`TestMethod' to `TestMethod2'
+Compilation failed: 2 error(s), 0 warnings
+
+How often does this happen? 
+
+consistently.
+
+Additional Information:
+
+r57749 works fine. r57750 does not.


More information about the mono-bugs mailing list