http://d.puremagic.com/issues/show_bug.cgi?id=2793
Summary: Unreachable code in Phobos std.algorithm sort Product: D Version: 2.026 Platform: PC OS/Version: Windows Status: NEW Keywords: rejects-valid Severity: normal Priority: P3 Component: Phobos AssignedTo: bugzi...@digitalmars.com ReportedBy: g...@nwawudu.com The following code does not compile with warnings enabled (-w). Commenting out src\phobos\std\algorithm.d lines 2119 and 2121 fixes the issue. import std.algorithm; void main() { int[] a = [1, 2, 3]; sort(a); } C:> dmd -w test.d warning - C:\D\dmd\windows\bin\..\..\src\phobos\std\algorithm.d(2119): Error: statement is not reachable C:\D\dmd\windows\bin\..\..\src\phobos\std\algorithm.d(2504): template instance std.algorithm.sortImpl!(binaryFun,ss,iterSwap,int[]).sortImpl.partition!(pred,ss,iterSwap,int[]) error instantiating --