[Mono-bugs] [Bug 488960] New: Invalid CS0663 error with generics ('overloaded function cannot differ on use of parameter modifiers only')
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Wed Mar 25 19:01:46 EDT 2009
https://bugzilla.novell.com/show_bug.cgi?id=488960
Summary: Invalid CS0663 error with generics ('overloaded
function cannot differ on use of parameter modifiers
only')
Classification: Mono
Product: Mono: Compilers
Version: 2.2.x
Platform: All
OS/Version: All
Status: NEW
Severity: Normal
Priority: P5 - None
Component: C#
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: stapostol at gmail.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
User-Agent: Opera/9.64 (X11; Linux x86_64; U; el) Presto/2.1.1
Gmcs thinks "ref T" and "T[]" refer to the same type, but correctly
distinguishes "ref int" and "int[]" as different types.
The following code illustrates the issue:
class Test
{
static void Main() { }
// Error CS0663 on gmcs, works on csc
static void Foo<T>(ref T t) { }
static void Foo<T>(T[] t) { }
static void Foo<T>(T[,] t) { }
static void Foo<T>(T[,,] t) { }
// Works fine on both
static void Bar(ref int t) { }
static void Bar(int[] t) { }
static void Bar(int[,] t) { }
static void Bar(int[,,] t) { }
}
Reproducible: Always
Steps to Reproduce:
1. Compile the above code with gmcs.
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the mono-bugs
mailing list