https://bugzilla.novell.com/show_bug.cgi?id=478333
Summary: Wrong ctor method used
Classification: Mono
Product: Mono: Compilers
Version: SVN
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: P5 - None
Component: C#
AssignedTo: [email protected]
ReportedBy: [email protected]
QAContact: [email protected]
Found By: ---
Just ran into a bug in gmcs where the wrong ctor method is used in the
following scenario:
using System;
public class Test
{
static void Main()
{
Foo fu = new Foo (null);
}
}
class Foo {
public Foo (object o)
{
Console.WriteLine ("Called the right ctor!");
}
public Foo (string s, params object [] args)
{
Console.WriteLine ("Called the wrong ctor!");
}
}
new Foo (null) /should/ use the Foo(object) ctor, but it is using the
Foo(string, params object[]) ctor instead.
If I do fu = new Foo ((object) null), it calls the correct ctor.
--
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.
_______________________________________________
mono-bugs maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs