Bug 857 – Error: no size for type void() doesn't show the line number
Status
RESOLVED
Resolution
WORKSFORME
Severity
minor
Priority
P3
Component
dmd
Product
D
Version
D1 (retired)
Platform
All
OS
All
Creation time
2007-01-19T14:25:00Z
Last change time
2014-02-15T13:13:10Z
Keywords
diagnostic
Assigned to
bugzilla
Creator
matti.niemenmaa+dbugzilla
Comments
Comment #0 by matti.niemenmaa+dbugzilla — 2007-01-19T14:25:59Z
void main() {
void function()[] x;
x = &main ~ x;
}
The above invalid code causes the error "Error: no size for type void()". The error on which the line occurs is not reported.
Comment #2 by matti.niemenmaa+dbugzilla — 2007-03-23T12:28:18Z
Works in 1.009 - the code compiles. Looking at it now, I'm not sure why I called it invalid. It was probably the fact that code like the following is valid, which I didn't know until now:
int[] x;
x = 1 ~ x; // concatenating to an int, which is kind of weird