← Back to index
|
Original Bugzilla link
Bug 7403 – Possible to instantiate forward referenced classes
Status
RESOLVED
Resolution
INVALID
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-01-30T17:28:00Z
Last change time
2012-01-31T01:19:04Z
Assigned to
nobody
Creator
code
Comments
Comment #0
by code — 2012-01-30T17:28:33Z
class Forward; void main() { auto fwd = new Forward; // linker error } ---- This should be detected at compile time.
Comment #1
by doob — 2012-01-30T23:20:01Z
Isn't it possible to have the implementation in a different object file?
Comment #2
by bugzilla — 2012-01-31T01:19:04Z
Jacob's right. This is not a bug. It's not conceptually different from calling a function marked as "extern".