April 28, 2021 [Issue 21872] Warning: statement is not reachable should be error instead of warning! | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=21872 Vladimir Panteleev <dlang-bugzilla@thecybershadow.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |dlang-bugzilla@thecybershad | |ow.net Resolution|--- |INVALID --- Comment #1 from Vladimir Panteleev <dlang-bugzilla@thecybershadow.net> --- (In reply to mw from comment #0) > Currently the compiler will *stop* after issue this warning: > > ``` > Warning: statement is not reachable > ``` With `-wi`, it does not in fact stop: ------------------------------------------------------ $ cat test.d import std.stdio; void main() { writeln("Hello"); return; writeln("World"); } $ dmd -wi -run test.d test.d(7): Warning: statement is not reachable Hello ------------------------------------------------------ Please clarify. -- |
Copyright © 1999-2021 by the D Language Foundation