Bug 8437 – [2.060 beta] static struct no size yet for forward reference
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-07-25T09:47:00Z
Last change time
2012-07-28T13:32:55Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
destructionator
Comments
Comment #0 by destructionator — 2012-07-25T09:47:01Z
I just tried the dmd 2.060 beta on my work app and got an error that
wasn't present on 2.059. This is trimmed down as small as I can:
===
class Cgi {
struct PostParserState {
UploadedFile piece;
}
static struct UploadedFile {
string contentFilename;
}
}
===
$ dmd -c regression.d
regression.d(6): Error: struct regression.Cgi.UploadedFile no size yet for forward reference
If I take the static off of UploadedFile, the error goes away. Or
I can swap the order of the definitions and the error goes away, but
it used to work the way it is.
Comment #1 by dmitry.olsh — 2012-07-27T15:22:38Z
Thanks for filing this. I've hit similar issue with my project but failed to narrow it down.