[Mono-bugs] [Bug 76085][Min] New - mcs fails to resolve overload that takes __varargs

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Tue Sep 13 13:59:32 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=76085

--- shadow/76085	2005-09-13 13:59:32.000000000 -0400
+++ shadow/76085.tmp.13234	2005-09-13 13:59:32.000000000 -0400
@@ -0,0 +1,79 @@
+Bug#: 76085
+Product: Mono: Compilers
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Minor
+Component: C#
+AssignedTo: rharinath at novell.com                            
+ReportedBy: atsushi at ximian.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: mcs fails to resolve overload that takes __varargs 
+
+If there is __varargs argument in an extern method, mcs fails to resolve
+invocations:
+
+using System;
+using System.Runtime.InteropServices;
+
+namespace System.Windows.Forms
+{
+        internal class X11Xim
+        {
+                [DllImport ("libX11", EntryPoint="XCreateIC")]
+                internal extern static IntPtr XCreateIC(IntPtr xim, __arglist);
+
+                public static void Main ()
+                {
+                        XCreateIC (IntPtr.Zero);
+                        XCreateIC (IntPtr.Zero, IntPtr.Zero);
+                }
+        }
+}
+
+
+Actual Results:
+
+fails.cs(13,4): error CS1501: No overload for method `XCreateIC' takes `1'
+arguments
+Exception caught by the compiler while compiling:
+   Block that caused the problem begin at: fails.cs(11,22):
+                     Block being compiled: [fails.cs(12,3):,fails.cs(15,3):]
+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 ImplicitConversionExists have gone out of sync
+in <0x00c33> Mono.CSharp.Invocation:OverloadResolve
+(Mono.CSharp.EmitContext ec, Mono.CSharp.MethodGroupExpr me,
+System.Collections.ArrayList Arguments, Boolean may_fail, Location loc)
+in <0x002c4> Mono.CSharp.Invocation:DoResolve (Mono.CSharp.EmitContext ec)
+in <0x000e3> Mono.CSharp.Expression:Resolve (Mono.CSharp.EmitContext ec,
+ResolveFlags flags)
+in <0x00012> Mono.CSharp.Expression:Resolve (Mono.CSharp.EmitContext ec)
+in <0x00013> Mono.CSharp.ExpressionStatement:ResolveStatement
+(Mono.CSharp.EmitContext ec)
+in <0x0001f> Mono.CSharp.StatementExpression:Resolve
+(Mono.CSharp.EmitContext ec)
+in <0x001b6> Mono.CSharp.Block:Resolve (Mono.CSharp.EmitContext ec)
+in <0x00122> Mono.CSharp.EmitContext:ResolveTopBlock
+(Mono.CSharp.EmitContext anonymous_method_host, Mono.CSharp.ToplevelBlock
+block, Mono.CSharp.InternalParameters ip, IMethodData md, System.Boolean
+unreachable)
+
+
+Expected Results:
+
+compiles without problem.
+
+How often does this happen? 
+
+Consistently.


More information about the mono-bugs mailing list