4048 – [CTFE] struct initializer: missing line number in error message

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 4048 - [CTFE] struct initializer: missing line number in error message
Summary: [CTFE] struct initializer: missing line number in error message
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86 Windows
: P2 normal
Assignee: No Owner
URL:
Keywords: diagnostic
Depends on:
Blocks:
Reported: 2010年04月02日 14:34 UTC by bearophile_hugs
Modified: 2015年06月09日 05:11 UTC (History)
2 users (show)

See Also:


Attachments
Add an attachment (proposed patch, testcase, etc.)

Note You need to log in before you can comment on or make changes to this issue.
Description bearophile_hugs 2010年04月02日 14:34:02 UTC
(Not tested with the latest bug fixes)
struct Foo {
 /*static*/ struct Bar { int x; }
 Bar b = { x: 1 };
}
int spam() {
 Foo f;
 return 0;
}
void main() {
 enum int _ = spam();
}
dmd 2.042 gives (with no line of error):
Error: cannot make expression out of initializer for b
Comment 1 Don 2011年04月12日 00:18:00 UTC
The rejects-valid aspect of this bug is a duplicate of bug 3792.


AltStyle によって変換されたページ (->オリジナル) /