[Issue 6656] static alias this broken in 2.055
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Sep 17 20:31:59 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6656
Kenji Hara <k.hara.pg at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|rejects-valid |diagnostic
Severity|regression |normal
--- Comment #1 from Kenji Hara <k.hara.pg at gmail.com> 2011-09-17 20:31:37 PDT ---
This is not regression, is diagnostic issue.
Originally "alias this" only accepts a member symbol of an aggregate itself
belongs. Therefore the code in comment #0 is invalid because A is lies outside
of B.
By fixing bug 6561, it has been fixed in 2.055, invalid alias this always
prints "undefined identifier" error. In this case, we cannot use A as B's alias
this symbol, but we can lookup A from inside B. Then this is *diagnostic* issue
that the message is not sufficiently descriptive.
In 2.054, following code doesn't work.
----
struct A
{
static void foo(){}
}
struct B
{
static alias A this;
}
void main()
{
B.foo(); // want to call A.foo, but fails
}
----
If this issue is 'regression', above code should work in 2.054, but doesn't.
--
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