зеркало из https://github.com/mono/mail-archives.git
135 строки
4.2 KiB
HTML
135 строки
4.2 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE> [Mono-bugs] [Bug 46199][Nor] New - Wrong overloading resolution for params
|
|
</TITLE>
|
|
<LINK REL="Index" HREF="index.html" >
|
|
<LINK REL="made" HREF="mailto:bugzilla-daemon%40rocky.ximian.com">
|
|
<META NAME="robots" CONTENT="index,nofollow">
|
|
|
|
<LINK REL="Previous" HREF="006317.html">
|
|
<LINK REL="Next" HREF="006319.html">
|
|
</HEAD>
|
|
<BODY BGCOLOR="#ffffff">
|
|
<H1>[Mono-bugs] [Bug 46199][Nor] New - Wrong overloading resolution for params
|
|
</H1>
|
|
<B>bugzilla-daemon@rocky.ximian.com
|
|
</B>
|
|
<A HREF="mailto:bugzilla-daemon%40rocky.ximian.com"
|
|
TITLE="[Mono-bugs] [Bug 46199][Nor] New - Wrong overloading resolution for params">bugzilla-daemon@rocky.ximian.com
|
|
</A><BR>
|
|
<I>Sat, 12 Jul 2003 11:27:30 -0400 (EDT)</I>
|
|
<P><UL>
|
|
<LI> Previous message: <A HREF="006317.html">[Mono-bugs] [Bug 46197][Wis] Changed - mint fails to report exceptions inside TransparentProxies
|
|
</A></li>
|
|
<LI> Next message: <A HREF="006319.html">[Mono-bugs] [Bug 46088][Nor] Changed - Nested class can access private members of base class of enclosing class
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#6318">[ date ]</a>
|
|
<a href="thread.html#6318">[ thread ]</a>
|
|
<a href="subject.html#6318">[ subject ]</a>
|
|
<a href="author.html#6318">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
<HR>
|
|
<!--beginarticle-->
|
|
<PRE>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 <A HREF="mailto:sestoft@dina.kvl.dk.">sestoft@dina.kvl.dk.</A>
|
|
|
|
<A HREF="http://bugzilla.ximian.com/show_bug.cgi?id=46199">http://bugzilla.ximian.com/show_bug.cgi?id=46199</A>
|
|
|
|
--- shadow/46199 Sat Jul 12 11:27:30 2003
|
|
+++ shadow/46199.tmp.9159 Sat Jul 12 11:27:30 2003
|
|
@@ -0,0 +1,71 @@
|
|
+Bug#: 46199
|
|
+Product: Mono/MCS
|
|
+Version: unspecified
|
|
+OS:
|
|
+OS Details:
|
|
+Status: NEW
|
|
+Resolution:
|
|
+Severity:
|
|
+Priority: Normal
|
|
+Component: Misc
|
|
+AssignedTo: <A HREF="mailto:mono-bugs@ximian.com">mono-bugs@ximian.com</A>
|
|
+ReportedBy: <A HREF="mailto:sestoft@dina.kvl.dk">sestoft@dina.kvl.dk</A>
|
|
+QAContact: <A HREF="mailto:mono-bugs@ximian.com">mono-bugs@ximian.com</A>
|
|
+TargetMilestone: ---
|
|
+URL:
|
|
+Cc:
|
|
+Summary: Wrong overloading resolution for params
|
|
+
|
|
+Description of Problem:
|
|
+
|
|
+In MS CLR 1.1, the call m(1, 2) invokes m(int, int[]); in Mono
|
|
+it invokes m(int, double).
|
|
+
|
|
+The C# Language Spec 1.1.3 says that both are applicable (bcs. the
|
|
+expanded form of m(int, int[]) is m(int, int) which is not the same
|
|
+as m(int, double). But the expanded form m(int, int) of m(int,
|
|
+int[]) is better than m(int, double), and therefore the former
|
|
+should be called.
|
|
+
|
|
+This is an mcs (compiler) problem; the generated bytecode behaves
|
|
+the same under MS CLR 1.1 as under mono 0.25.
|
|
+
|
|
+Steps to reproduce the problem:
|
|
+1. Compile and run this program:
|
|
+
|
|
+using System;
|
|
+
|
|
+class MyTest {
|
|
+ public static void Main(String[] args) {
|
|
+ Console.WriteLine(m(1, 2));
|
|
+ }
|
|
+
|
|
+ public static int m(int a, double b) {
|
|
+ Console.Write("m(int, double): ");
|
|
+ return a + (int)b;
|
|
+ }
|
|
+
|
|
+ public static int m(int x0, params int[] xr) {
|
|
+ Console.Write("m(int, int[]): ");
|
|
+ int res = x0;
|
|
+ foreach (int i in xr)
|
|
+ res += i;
|
|
+ return res;
|
|
+ }
|
|
+}
|
|
+
|
|
+
|
|
+Actual Results:
|
|
+
|
|
+m(int, double): 3
|
|
+
|
|
+Expected Results:
|
|
+
|
|
+m(int, int[]): 3
|
|
+
|
|
+How often does this happen?
|
|
+
|
|
+Always, on mono 0.25 (and 0.23).
|
|
+
|
|
+
|
|
+Additional Information:
|
|
|
|
</PRE>
|
|
<!--endarticle-->
|
|
<HR>
|
|
<P><UL>
|
|
<!--threads-->
|
|
<LI> Previous message: <A HREF="006317.html">[Mono-bugs] [Bug 46197][Wis] Changed - mint fails to report exceptions inside TransparentProxies
|
|
</A></li>
|
|
<LI> Next message: <A HREF="006319.html">[Mono-bugs] [Bug 46088][Nor] Changed - Nested class can access private members of base class of enclosing class
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#6318">[ date ]</a>
|
|
<a href="thread.html#6318">[ thread ]</a>
|
|
<a href="subject.html#6318">[ subject ]</a>
|
|
<a href="author.html#6318">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
</body></html>
|