Bug 3802 – Error message without line number when using struct initializers for a struct with constructors.

Status
RESOLVED
Resolution
DUPLICATE
Severity
minor
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
All
Creation time
2010-02-14T07:49:00Z
Last change time
2015-06-09T01:27:41Z
Assigned to
nobody
Creator
sludwig

Comments

Comment #0 by sludwig — 2010-02-14T07:49:21Z
Using the struct initializer syntax which is now forbidden for structs with constructors results in an error message without line number information. --- struct test { int f; this(int x){ f = x; } } immutable test t2 = {1}; --- output: Error: struct test has constructors, cannot use { initializers }, use test( initializers ) instead
Comment #1 by clugdbug — 2010-02-15T02:03:08Z
*** This issue has been marked as a duplicate of issue 3662 ***