Bug 6063 – Make cases where hiddenfuncerror would be thrown an error without -w

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
All
Creation time
2011-05-27T11:52:03Z
Last change time
2018-05-29T17:29:19Z
Assigned to
No Owner
Creator
Steven Schveighoffer

Comments

Comment #0 by schveiguy — 2011-05-27T11:52:03Z
It was discussed on the newsgroup here: http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=136941 that the compiler's current behavior of inserting a dummy function that throws HiddenFuncError is nowhere near as useful as just disabling compiling that class. It was also discovered that the desired behavior exists if you compile with -w. This should be the default behavior. See: http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=136962 Also, see bug 3836 for another feature that should be moved to the flag-less version of dmd (per the same post above).
Comment #1 by andrei — 2016-10-14T15:39:25Z
Do we still have that?
Comment #2 by dmitry.olsh — 2018-05-29T12:16:50Z
Steve, any chance to dig up that example code?
Comment #3 by schveiguy — 2018-05-29T17:29:19Z
Here is a modernized link (Took me a bit to find this, as it seems the webnews link isn't working any more, it just shows the PHP script): https://forum.dlang.org/post/[email protected] That shows the example that Andrei tested. Compiling this now gives a compile-time error: https://run.dlang.io/is/ifJPgU Note that even back to 2.060, it was a compiler error with a deprecation. I also tested a local example that I had to test the same thing. It fails now, builds with 2.050 and throws the error. So I think this is fixed as of some version prior to 2.060.