October 03 [Issue 24789] New: Disallow body-less, non-extern, local functions | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=24789 Issue ID: 24789 Summary: Disallow body-less, non-extern, local functions Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: minor Priority: P1 Component: dmd Assignee: nobody@puremagic.com Reporter: b2.temp@gmx.com Given this small program, which compiles and run without error: ```d module m; void oops(){} void main() { void oops(); } ``` there could be an error for `main.oops` because 1. local body-less funcdecls have no use. 2. possibly the author was super-tired and meant to call `m.oops`. -- |
Copyright © 1999-2021 by the D Language Foundation