[Issue 6083] [tdpl] There can be only one alias this.

2022-12-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=6083

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P2  |P3

--


[Issue 6083] [tdpl] There can be only one alias this.

2016-10-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=6083

Andrei Alexandrescu  changed:

   What|Removed |Added

   Keywords||bootcamp

--- Comment #7 from Andrei Alexandrescu  ---
I'll bootcamp this as the original author, although well intended, doesn't have
the time to push it through completion.

--


[Issue 6083] [tdpl] There can be only one alias this.

2016-05-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=6083

Xiao Di Guan  changed:

   What|Removed |Added

 CC||x...@puxlit.net

--


[Issue 6083] [tdpl] There can be only one alias this.

2014-12-05 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=6083

hst...@quickfur.ath.cx changed:

   What|Removed |Added

   Keywords||pull

--- Comment #6 from hst...@quickfur.ath.cx ---
https://github.com/D-Programming-Language/dmd/pull/3998

--


[Issue 6083] [tdpl] There can be only one alias this.

2014-02-26 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=6083


Adam D. Ruppe  changed:

   What|Removed |Added

 CC||destructiona...@gmail.com


--- Comment #5 from Adam D. Ruppe  2014-02-26 
07:42:39 PST ---
I'm not so sure about the ambiguity thing. Consider the following case of a
wrapped NotNull!T:

interface A { void foo(); }
interface B {}
class C : A, B { void foo() {} }
class D : C {}

NotNull!D should implicitly cast to D (a not null is always a maybe null),
which gives access to the methods, as well as NotNull!C - classes can always
implicitly cast to their base.

NotNull!C should implicitly cast to C, NotNull!A, NotNull!B, and
NotNull!Object.


Now consider we call

NotNull!D d = ...;
d.foo();

what happens?

1) foo is not a member of NotNull!D, so we try to match the alias thises.

2) D.foo works, so we add that to the ok list.

3) NotNull!C doesn't work, which triggers its list: C.foo also works.


Is this an error? C.foo and D.foo refer to the same function, since it is an
overridden virtual, but it would compile as both and might be considered
ambiguous.

However it is implemented, I'd argue it is important that this works since this
is one of my main use cases for multiple alias this.

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


[Issue 6083] [tdpl] There can be only one alias this.

2014-01-10 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=6083



--- Comment #4 from timon.g...@gmx.ch 2014-01-10 17:33:20 PST ---
(In reply to comment #2)
> The implementation of multiple alias this should lead to semantics that are
> independent of order, i.e. all `alias this` are tried and if two or more match
> that's an ambiguity.

A good guideline is to make them behave similarly to imports as far as symbol
look-up is concerned.

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


[Issue 6083] [tdpl] There can be only one alias this.

2014-01-10 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=6083



--- Comment #2 from Andrei Alexandrescu  2014-01-10 16:40:39 
PST ---
The implementation of multiple alias this should lead to semantics that are
independent of order, i.e. all `alias this` are tried and if two or more match
that's an ambiguity.

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


[Issue 6083] [tdpl] There can be only one alias this.

2014-01-10 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=6083



--- Comment #3 from Andrei Alexandrescu  2014-01-10 16:42:59 
PST ---
$100 bounty placed:
https://www.bountysource.com/issues/1375081-tdpl-there-can-be-only-one-alias-this

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


[Issue 6083] [TDPL] There can be only one alias this.

2011-05-31 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6083


Jonathan M Davis  changed:

   What|Removed |Added

 CC||jmdavisp...@gmx.com
Summary|There can be only one alias |[TDPL] There can be only
   |this.   |one alias this.


--- Comment #1 from Jonathan M Davis  2011-05-31 17:56:47 
PDT ---
It's a well-known issue. alias this really isn't fully implemented yet and has
lots of bugs to be ironed out. The lack of ability to have more than one alias
this is one of them. I'm not sure that there's a bug report on it though, so
it's good to have a placeholder for the issue.

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