Bug 12124 – Never be used static opCall should be reported
Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-02-09T18:57:00Z
Last change time
2014-02-16T02:45:09Z
Keywords
diagnostic, pull
Assigned to
nobody
Creator
k.hara.pg
Comments
Comment #0 by k.hara.pg — 2014-02-09T18:57:56Z
From:
https://github.com/D-Programming-Language/dmd/pull/3221#issuecomment-34595032
By fixing issue 12070, this code never asserts in runtime.
struct S
{
this(int) {}
static S opCall()
{
assert(0);
}
}
void main()
{
auto s = S();
}
To avoid silent code breaking, compiler should report message that static opCall is never used.