Bug 9067 – Can't assign values from privately included modules to enums.
Status
RESOLVED
Resolution
INVALID
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Windows
Creation time
2012-11-23T11:26:00Z
Last change time
2013-02-04T11:25:50Z
Assigned to
nobody
Creator
gor
Comments
Comment #0 by gor — 2012-11-23T11:26:38Z
Here's a pair of code, the first of which doesn't compile and the second of which does compile.
//------------------------------------------------------------------------------
module foo;
public:
enum Count
{
one = bar.one,
two = bar.two,
three = bar.three,
}
private:
import bar;
// foo.d(6): Error: undefined identifier bar.one
//------------------------------------------------------------------------------
module foo;
public:
import bar;
enum Count
{
one = bar.one,
two = bar.two,
three = bar.three,
}
//------------------------------------------------------------------------------
Comment #1 by andrej.mitrovich — 2013-02-04T11:25:50Z
And where is 'bar' defined?
Anyway if I manually define the bar module with those identifiers both samples work.