April 03, 2009 [Issue 2793] New: Unreachable code in Phobos std.algorithm sort | ||||
---|---|---|---|---|
| ||||
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: bugzilla@digitalmars.com ReportedBy: gide@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 -- |
May 02, 2009 [Issue 2793] Unreachable code in Phobos std.algorithm sort | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=2793 gide@nwawudu.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED ------- Comment #1 from gide@nwawudu.com 2009-05-02 08:53 ------- Fixed in DMD 2.029. -- |
Copyright © 1999-2021 by the D Language Foundation