Bug 10499 – [REG 2.064] retro is no longer CTFE-able

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-06-29T02:50:00Z
Last change time
2013-07-08T19:11:38Z
Keywords
CTFE, pull
Assigned to
nobody
Creator
dmitry.olsh

Comments

Comment #0 by dmitry.olsh — 2013-06-29T02:50:21Z
Stripped from new std.uni: import std.range; string genUnrolledSwitch(size_t size) { foreach(v; iota(0, size).retro()) { } return "OK"; } pragma(msg, genUnrolledSwitch(4)); C:\dmd2\windows\bin\..\..\src\phobos\std\range.d(1462): Error: Declaration static template Result() is not yet implemented in CTFE unrolled.d(5): called from here: retro(iota(0, size)) unrolled.d(5): called from here: map(retro(iota(0, size))) unrolled.d(12): called from here: genUnrolledSwitch(4u) genUnrolledSwitch(4u) Failed: "dmd" "-v" "-o-" "unrolled.d" "-I." Introduced by commit: d8d4c1ea41fcb06ee6e40b8b0e6dc10ade63e11a It exposed a limitation in CTFE by turning inner struct into an empty-args template (to deduce purity/safety).
Comment #1 by k.hara.pg — 2013-07-08T00:04:35Z
Comment #2 by github-bugzilla — 2013-07-08T00:44:50Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/6052013ceecfb67556671ba28cafeebfeb1e45d6 fix Issue 10499 - retro is no longer CTFE-able https://github.com/D-Programming-Language/dmd/commit/f2cd7d4b19c58209d684403541e93416d071e78b Merge pull request #2318 from 9rnsr/fix10499 [REG2.064a] Issue 10499 - retro is no longer CTFE-able