Bug 8559 – void and function type prints redundant error message with init property
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-08-18T12:30:00Z
Last change time
2015-06-09T05:11:49Z
Keywords
diagnostic, pull
Assigned to
nobody
Creator
k.hara.pg
Comments
Comment #0 by k.hara.pg — 2012-08-18T12:30:20Z
void foo(){}
void main()
{
auto x = void.init;
auto y = typeof(foo).init;
}
Current output:
test.d(4): Error: void does not have an initializer
test.d(4): Error: void does not have a default initializer
test.d(5): Error: function does not have an initializer
test.d(5): Error: function does not have a default initializer
Expected:
test.d(4): Error: void does not have a default initializer
test.d(5): Error: function does not have a default initializer