[Mono-bugs] [Bug 586164] C# binding doesn't deal correctly with namespace/class+ctor clashes
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Mon Mar 8 06:54:42 EST 2010
http://bugzilla.novell.com/show_bug.cgi?id=586164
http://bugzilla.novell.com/show_bug.cgi?id=586164#c3
Andrés G. Aragoneses <knocte at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Version|2.6.x |2.2
Component|C# |C# Binding
AssignedTo|mono-bugs at lists.ximian.com |mkrueger at novell.com
Resolution|FEATURE |
QAContact|mono-bugs at lists.ximian.com |monodevelop-bugs at lists.ximi
| |an.com
Summary|Mono 2.6.1 won't let |C# binding doesn't deal
|compile simple |correctly with
|Gtk.SpinButton sample |namespace/class+ctor
| |clashes
Product|Mono: Compilers |MonoDevelop
--- Comment #3 from Andrés G. Aragoneses <knocte at gmail.com> 2010-03-08 11:54:41 UTC ---
(In reply to comment #1)
> This may have something to do with naming the project "SpinButton". That sets
> the default namespace to SpinButton, which conflicts with the type name.
>
> Does creating the same with a different project name work?
>
> You also could probably fully qualify the type SpinButton by using:
>
> Gtk.SpinButton blah = new Gtk.SpinButton ();
(In reply to comment #2)
> Your namespace clashes with imported type.
So true! what a stupid mistake.
However, this confusion was caused indeed by a MonoDevelop bug, so I'm
reopening and retargeting the bug.
Steps to reproduce:
1. Have a file in the project with this content:
using System;
namespace OtherNamespace {
public class TestClassOtherNamespace {
public TestClassOtherNamespace (string someParam) {}
}
}
2. Create another file in the project and write in it:
using OtherNamespace;
namespace TestClassOtherNamespace{
class MainClass{
public static void Main (string[] args){
new TestClassOtherNamespace ($
}
}
}
Current results:
At the time of writing the last character "(" (just before the cursor '$'),
code completion appears for the constructor of TestClassOtherNamespace(string
someParam).
Expected results:
That ctor should not be shown because it would lead to a compiler error. Some
visual warning should be shown to the user.
--
Configure bugmail: http://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