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.
Comment #1 by k.hara.pg — 2014-02-09T19:23:26Z
Comment #2 by github-bugzilla — 2014-02-16T02:03:44Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/98aeddcffd1f6826b2e332af951a32da05bcdfe0 fix Issue 12124 - Never be used static opCall should be reported https://github.com/D-Programming-Language/dmd/commit/be71f00450e8c189ec0db224a2c978de97d41161 Merge pull request #3240 from 9rnsr/fix12124 Issue 12124 - Never be used static opCall should be reported
Comment #3 by github-bugzilla — 2014-02-16T02:45:09Z
Commit pushed to 2.065 at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/79ae211e71cf0937523010e39f7f0981e9550904 Merge pull request #3240 from 9rnsr/fix12124 Issue 12124 - Never be used static opCall should be reported