D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 7163 - Can't alias an enum of an aliased struct
Summary: Can't alias an enum of an aliased struct
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: Other Windows
: P2 normal
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-24 18:12 UTC by Andrej Mitrovic
Modified: 2012-04-19 19:00 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Andrej Mitrovic 2011-12-24 18:12:35 UTC
This is a real bug from the DIL compiler:

struct Foo
{
    enum
    {
        One,
    }
}

struct Bar
{
    alias Foo F;
    alias F.One First;  // alias Foo.One First; would work
}

void main()
{}

test.d(14): Error: alias test.Bar.First cannot alias an expression 0

What's interesting is that this compiles fine in DMD1.
Comment 1 Andrej Mitrovic 2012-04-19 19:00:06 UTC
Fixed in 2.059, don't know which commit.