[Issue 2654] New: forward reference bug.
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Feb 10 13:04:32 PST 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2654
Summary: forward reference bug.
Product: D
Version: 2.023
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: someanon at yahoo.com
http://www.digitalmars.com/d/archives/digitalmars/D/circular_deps_53496.html
But according to the specs the compiler is indeed buggy.
The specs say:
| The order in which ImportDeclarations occur has no significance.
//main.d --------------8<---------------
import vec3, mat3, quat;
int main() { return 0; }
// mat3.d--------------8<---------------
module mat3;
import vec3, quat;
struct Mat3 { Vec3[3] m; }
// quat.d--------------8<---------------
module quat;
import vec3, mat3;
struct Quat {}
// vec3.d--------------8<---------------
module vec3;
import mat3, quat;
struct Vec3 { }
I get this back from the compiler....
unixbox$ dmd main.d vec3.d mat3.d quat.d
vec3.d(6): struct vec3.Vec3 no size yet for forward reference
vec3.d(6): struct vec3.Vec3 no size yet for forward reference
vec3.d(6): struct vec3.Vec3 no size yet for forward reference
unixbox$
--
More information about the Digitalmars-d-bugs
mailing list