D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 8123 - alias declaration lookup is broken
Summary: alias declaration lookup is broken
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P2 regression
Assignee: No Owner
URL:
Keywords: pull, rejects-valid
Depends on:
Blocks:
 
Reported: 2012-05-20 00:18 UTC by Kenji Hara
Modified: 2012-05-22 18:05 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Kenji Hara 2012-05-20 00:18:07 UTC
From digitalmars.D.learn newsgroup:
http://forum.dlang.org/thread/mailman.911.1337336339.24740.digitalmars-d-learn@puremagic.com

struct S { }

struct AS
{
    alias S Alias;
}

struct Wrapper
{
    AS as;
}

void main()
{
    Wrapper w;
    static assert(is(typeof(w.as).Alias == S));         // fail
    static assert(is(AS.Alias == S));                   // ok
    static assert(is(typeof(w.as) == AS));              // ok
    static assert(is(typeof(w.as).Alias == AS.Alias));  // fail
}
Comment 2 github-bugzilla 2012-05-20 14:54:15 UTC
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/76543ef60f3b871612ddc0c87999859f427ba6f9
fix Issue 8123 - alias declaration lookup is broken

https://github.com/D-Programming-Language/dmd/commit/77422c31beae5db7d867c6611256482e07048f37
Merge pull request #957 from 9rnsr/fix8123

Issue 8123 - alias declaration lookup is broken