[Issue 3452] Can't alias member functions such that the object name is implicitly stored in the alias

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Aug 7 06:27:16 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=3452



--- Comment #4 from Dicebot <public at dicebot.lv> 2013-08-07 06:27:12 PDT ---
(In reply to comment #3)
> The root of the issue is that alias does not capture local
> variable in this context - it captures only type name. The code above is
> essentially alias Foo.bar fun and since bar() is nonstatic the code doesn't
> compile.

There is a big issue with `alias` specification because of no clear definition
what is captured. Current documentation simply describes behavior of reference
implementation in various cases which is rather inconsistent on its own (as far
as I am aware, there is no even common alias handling in dmd).

Now my understanding of the `alias` concept is simple - it should capture
symbols, be it type symbol or variable symbol or anonymous lambda literal
symbol.

But I think you are right - cleaning this is worth separate DIP, plenty of
corner cases will arise.

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


More information about the Digitalmars-d-bugs mailing list