[Issue 21872] Warning: statement is not reachable should be error instead of warning!
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Apr 28 06:28:25 UTC 2021
https://issues.dlang.org/show_bug.cgi?id=21872
Vladimir Panteleev <dlang-bugzilla at thecybershadow.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |dlang-bugzilla at thecybershad
| |ow.net
Resolution|--- |INVALID
--- Comment #1 from Vladimir Panteleev <dlang-bugzilla at 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.
--
More information about the Digitalmars-d-bugs
mailing list