[Mono-bugs] [Bug 74991][Wis] New - [GMCS] Error implicit casting int[] -> ICollection <int>

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Wed May 18 21:50:26 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 grompf at sublimeintervention.com.

http://bugzilla.ximian.com/show_bug.cgi?id=74991

--- shadow/74991	2005-05-18 21:50:26.000000000 -0400
+++ shadow/74991.tmp.32671	2005-05-18 21:50:26.000000000 -0400
@@ -0,0 +1,35 @@
+Bug#: 74991
+Product: Mono: Compilers
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: C#
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: grompf at sublimeintervention.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: [GMCS] Error implicit casting int[] -> ICollection <int>
+
+The following test:
+
+        void test(System.Collections.Generic.ICollection<int> list) { }
+        void test3() { test(new int[]{1}); }
+
+throws:
+
+icol.cs(4) error CS1502: The best overloaded match for method 'T.test
+( System.Collections.Generic.ICollection`1)' has some invalid arguments
+icol.cs(4) error CS1503: Argument 1: Cannot convert from 'int[]' to ' 
+System.Collections.Generic.ICollection`1'
+icol.cs(4) error CS1501: No overload for method `test' takes `1' arguments
+Compilation failed: 3 error(s), 0 warnings
+
+It compiles fine on MS.NET 2.0 (latest beta)
+
+-kangaroo


More information about the mono-bugs mailing list