mail-archives/mono-bugs/2003-March/004129.html

129 строки
4.1 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE> [Mono-bugs] [Bug 39108][Wis] New - incorrect parameter array resolution for an argument with explicit cast
</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="004128.html">
<LINK REL="Next" HREF="004130.html">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>[Mono-bugs] [Bug 39108][Wis] New - incorrect parameter array resolution for an argument with explicit cast
</H1>
<B>bugzilla-daemon@rocky.ximian.com
</B>
<A HREF="mailto:bugzilla-daemon%40rocky.ximian.com"
TITLE="[Mono-bugs] [Bug 39108][Wis] New - incorrect parameter array resolution for an argument with explicit cast">bugzilla-daemon@rocky.ximian.com
</A><BR>
<I>Wed, 5 Mar 2003 11:02:51 -0500 (EST)</I>
<P><UL>
<LI> Previous message: <A HREF="004128.html">[Mono-bugs] [Bug 39105][Nor] New - System.Text.RegularExpressions.CategoryUtils.CategoryFromName fails for one-letter categories
</A></li>
<LI> Next message: <A HREF="004130.html">[Mono-bugs] We are looking for consultants
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#4129">[ date ]</a>
<a href="thread.html#4129">[ thread ]</a>
<a href="subject.html#4129">[ subject ]</a>
<a href="author.html#4129">[ 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:avd@openlinksw.com.">avd@openlinksw.com.</A>
<A HREF="http://bugzilla.ximian.com/show_bug.cgi?id=39108">http://bugzilla.ximian.com/show_bug.cgi?id=39108</A>
--- shadow/39108 Wed Mar 5 11:02:51 2003
+++ shadow/39108.tmp.14601 Wed Mar 5 11:02:51 2003
@@ -0,0 +1,65 @@
+Bug#: 39108
+Product: Mono/MCS
+Version: unspecified
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: Misc
+AssignedTo: <A HREF="mailto:mono-bugs@ximian.com">mono-bugs@ximian.com</A>
+ReportedBy: <A HREF="mailto:avd@openlinksw.com">avd@openlinksw.com</A>
+QAContact: <A HREF="mailto:mono-bugs@ximian.com">mono-bugs@ximian.com</A>
+TargetMilestone: ---
+URL:
+Cc:
+Summary: incorrect parameter array resolution for an argument with explicit cast
+
+Description of Problem:
+
+The section 10.5.1.4 of C# Language Specification
+allows passing of parameter array argument as a
+normal paramter without putting it into new array
+only if an argument is implicitly convertible to the
+parameter array type.
+
+In the end of this section there is an example that
+shows how explicit conversion of argumment to object
+(type object cannot be implicitly converted to type
+object[]) affects resolution of normal/expanded form
+of method invocation.
+
+Mcs does this incorrectly.
+
+Steps to reproduce the problem:
+Run this program:
+
+using System;
+
+public class TestParams
+{
+ public static void Main (string[] args)
+ {
+ Params (null);
+ Params ((object) null);
+ }
+
+ private static void Params (params object[] ps)
+ {
+ if (ps == null)
+ Console.WriteLine (&quot;null&quot;);
+ else
+ Console.WriteLine (ps.GetType ());
+ }
+}
+
+Actual Results:
+
+null
+null
+
+Expected Results (verified with MS .NET):
+
+null
+System.Object[]
</PRE>
<!--endarticle-->
<HR>
<P><UL>
<!--threads-->
<LI> Previous message: <A HREF="004128.html">[Mono-bugs] [Bug 39105][Nor] New - System.Text.RegularExpressions.CategoryUtils.CategoryFromName fails for one-letter categories
</A></li>
<LI> Next message: <A HREF="004130.html">[Mono-bugs] We are looking for consultants
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#4129">[ date ]</a>
<a href="thread.html#4129">[ thread ]</a>
<a href="subject.html#4129">[ subject ]</a>
<a href="author.html#4129">[ author ]</a>
</LI>
</UL>
</body></html>