[Issue 7206] Constructor from mixin does not conflict with other constructors

2020-09-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=7206

Simen Kjaeraas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||simen.kja...@gmail.com
 Resolution|--- |DUPLICATE

--- Comment #5 from Simen Kjaeraas  ---


*** This issue has been marked as a duplicate of issue 3332 ***

--


[Issue 7206] Constructor from mixin does not conflict with other constructors

2012-04-19 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7206


SomeDude lovelyd...@mailmetrash.com changed:

   What|Removed |Added

 CC||lovelyd...@mailmetrash.com


--- Comment #4 from SomeDude lovelyd...@mailmetrash.com 2012-04-19 12:38:06 
PDT ---
PS E:\DigitalMars\dmd2\samples rdmd bug.d
b
PS E:\DigitalMars\dmd2\samples rdmd -version=ErrorsAsExpected bug.d
bug.d(22): Error: constructor bug.A.this called with argument types:
(())
matches both:
bug.A.this()
and:
bug.A.this()
PS E:\DigitalMars\dmd2\samples

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 7206] Constructor from mixin does not conflict with other constructors

2012-01-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7206



--- Comment #1 from Robert Clipsham rob...@octarineparrot.com 2012-01-02 
22:13:34 GMT ---
I forgot to mention, when ErrorsAsExpected is not defined, this prints b, the
constructor from the mixin is disregarded.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 7206] Constructor from mixin does not conflict with other constructors

2012-01-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7206


timon.g...@gmx.ch changed:

   What|Removed |Added

 CC||timon.g...@gmx.ch


--- Comment #2 from timon.g...@gmx.ch 2012-01-02 14:24:56 PST ---
This is by design:

Spec: Mixin Scope
The declarations in a mixin are 'imported' into the surrounding scope. If the
name of a declaration in a mixin is the same as a declaration in the
surrounding scope, the surrounding declaration overrides the mixin one.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 7206] Constructor from mixin does not conflict with other constructors

2012-01-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7206


Trass3r mrmoc...@gmx.de changed:

   What|Removed |Added

   Keywords||diagnostic
 CC||mrmoc...@gmx.de


--- Comment #3 from Trass3r mrmoc...@gmx.de 2012-01-02 14:42:28 PST ---
Imho it isn't right though to silently accept this.
There should at least be a warning that the code doesn't work as the general
programmer would expect and maybe give a hint that you can achieve overload
resolution with an additional alias.

Otherwise it heavily depends on your code if you are lucky and get an error
message like in http://d.puremagic.com/issues/show_bug.cgi?id=3332 or
unexpected behavior.

This is not limited to constructors. Overload resolution in general isn't
easily possible.
I have to resort to ugly string mixins just because of this.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---