[Issue 8804] New: countUntil warning on an infinite range

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Oct 11 14:34:20 PDT 2012


http://d.puremagic.com/issues/show_bug.cgi?id=8804

           Summary: countUntil warning on an infinite range
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: diagnostic
          Severity: minor
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: bearophile_hugs at eml.cc


--- Comment #0 from bearophile_hugs at eml.cc 2012-10-11 14:34:19 PDT ---
import std.range: recurrence;
import std.algorithm: countUntil;
void main() {
    auto fibs = recurrence!q{a[n-1] + a[n-2]}(1, 1);
    auto f20 = countUntil!(x => x >= 20)(fibs);
}


DMD 2.061alpha:

...\algorithm.d(4038): Warning: statement is not reachable

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list