[Issue 20907] [DIP1000] Unittest fails when duplicated

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Aug 10 19:54:52 UTC 2021


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

Dennis <dkorpel at live.nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Hardware|x86                         |All
                 OS|Windows                     |All
           Severity|enhancement                 |normal

--- Comment #2 from Dennis <dkorpel at live.nl> ---
Nevermind, the url shortener was blocked on the network I was on.

Here's the code reduced some more:

```
Lockstep!() lockstep()
{
    return Lockstep!()();
}

struct Lockstep()
{
    int opApply(int delegate(int) callback) @system
    {
        return 0;
    }

    int opApply(int delegate(int) pure nothrow @nogc @safe callback) pure
nothrow @nogc @safe
    {
        return 0;
    }
}

void foo0() 
{
    foreach (x; lockstep()) {} // OK
}

void foo1() 
{
    foreach (x; lockstep()) {} // FAILS
}
```

--


More information about the Digitalmars-d-bugs mailing list