www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 17539] New: std.parallellism.parallel triggers 'statement not

https://issues.dlang.org/show_bug.cgi?id=17539

          Issue ID: 17539
           Summary: std.parallellism.parallel triggers 'statement not
                    reachable' warnings in the rdmd_test suite
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: greensunny12 gmail.com

Reduced test from https://github.com/dlang/tools/blob/master/rdmd_test.d:


void runConcurrencyTest()
{
    import std.parallelism : parallel;
    import std.random : rndGen;
    foreach (rnd; rndGen.parallel) {}
}


Output:

/home/seb/dlang/dmd/generated/linux/release/64/../../../../../phobos/std/parallelism.d(3523):
Warning: statement is not reachable
/home/seb/dlang/dmd/generated/linux/release/64/../../../../../phobos/std/parallelism.d(3523):
Warning: statement is not reachable

--
Jun 21 2017