The following will not compile with warnings enabled (-w):
import std.string;
int main()
{
return 0;
}
The error is:
warning - C:\Apps\DigitalMars\dmd2\src\phobos\std\string.d(1600): Error: stateme
nt is not reachable
C:\Apps\DigitalMars\dmd2\src\phobos\std\string.d(594): template instance std.str
ing.startsWith!(invariant(char)[],invariant(char[1u])) error instantiating
Line 1600 is a return statement. Commenting it out and recompiling yields me:
warning - C:\Apps\DigitalMars\dmd2\src\phobos\std\string.d(1690): Error: stateme
nt is not reachable
C:\Apps\DigitalMars\dmd2\src\phobos\std\string.d(609): template instance std.str
ing.endsWith!(invariant(char)[],invariant(char[1u])) error instantiating
Line 16090 is another return statement. Commenting out both lines 1600 and 1690
allows this to compile correctly.
Comment #1 by torhu — 2008-01-21T23:31:41Z
*** This bug has been marked as a duplicate of 1704 ***