D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 7974 - forward reference of mixin declaration
Summary: forward reference of mixin declaration
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:
Depends on:
Blocks:
 
Reported: 2012-04-23 08:24 UTC by Martin Nowak
Modified: 2012-04-24 00:33 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 Martin Nowak 2012-04-23 08:24:40 UTC
cat > bug.d << CODE
mixin template mix()
{
    uint _x;
}

struct Foo
{
    immutable Foo fa = Foo(0);

    this(uint x)
    {
        _x = x;
    }

    mixin mix!();
}
CODE

dmd -c bug

--------
bug.d(12): Error: couldn't find field _x of type uint in Foo()
bug.d(8):        called from here: Foo().this(0u)
--------
Comment 1 github-bugzilla 2012-04-23 23:25:43 UTC
Commit pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/0d304bf861b3dd323d3662edfc0f7f17566929ae
fix Issue 7974 - forward reference of mixin declaration
Comment 2 github-bugzilla 2012-04-23 23:26:00 UTC
Commit pushed to dmd-1.x at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/d13dc678353fd6798b15d9268e6fcf9c7837c23f
fix Issue 7974 - forward reference of mixin declaration