Bug 5150 – lazy allows you to declare void parameters
Status
RESOLVED
Resolution
INVALID
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Linux
Creation time
2010-11-01T09:24:00Z
Last change time
2015-06-09T05:15:12Z
Keywords
accepts-invalid
Assigned to
nobody
Creator
issues.dlang
Comments
Comment #0 by issues.dlang — 2010-11-01T09:24:46Z
This program compiles:
void func(lazy void a)
{
}
void main()
{
}
It shouldn't. If a were not lazy, you'd get the error
d.d(1): Error: cannot have parameter of type void
It shouldn't be any more legal to have a lazy void parameter than a void parameter. It makes it seem like lazy parameters aren't properly type checked.