[Issue 461] New: Constant not understood to be constant when circular module dependency exists.
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Oct 25 18:15:58 PDT 2006
http://d.puremagic.com/issues/show_bug.cgi?id=461
Summary: Constant not understood to be constant when circular
module dependency exists.
Product: D
Version: 0.172
Platform: PC
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: digitalmars-com at baysmith.com
dmd tmp2.d tmp2b.d
tmp2b.d(6): Integer constant expression expected instead of SIZE
tmp2b.d(6): Integer constant expression expected instead of SIZE
----- tmp2.d -----
private import tmp2b;
const int SIZE = 7;
----- tmp2b.d -----
private import tmp2;
struct s {
char a[ SIZE ];
}
Workaround:
Move constant above import of other module.
----- tmp2.d -----
const int SIZE = 7;
private import tmp2b;
--
More information about the Digitalmars-d-bugs
mailing list