D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 3611 - Enum forward referencing regression
Summary: Enum forward referencing regression
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: Other Windows
: P2 regression
Assignee: No Owner
URL:
Keywords: rejects-valid
Depends on:
Blocks: 340
  Show dependency treegraph
 
Reported: 2009-12-12 04:31 UTC by Koroskin Denis
Modified: 2015-06-09 01:26 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Koroskin Denis 2009-12-12 04:31:06 UTC
I decided to upgrade to a newer compiler version and noticed a regression between DMD2.031 (that compiles okay) and DMD2.032 (that issues "enum Foo is foward referenced").

module A;

class B : A
{
}

enum SomeEnum
{
    EnumMember
}

class A
{
    SomeEnum someEnum()
    {
        return SomeEnum.EnumMember;
    }
}

Ouput: A.d(8): Error: enum SomeEnum is forward referenced

Blocker.
Comment 1 Walter Bright 2009-12-28 21:10:00 UTC
Changeset 317
Comment 2 Leandro Lucarella 2009-12-29 08:58:36 UTC
http://www.dsource.org/projects/dmd/changeset/317
Comment 3 Walter Bright 2009-12-31 11:16:40 UTC
Fixed dmd 1.054 and 2.038