www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 23100] New: empty array literal passed to scope param not

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

          Issue ID: 23100
           Summary: empty array literal passed to scope param not 'falsey'
                    anymore
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: regression
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: dkorpel live.nl

This fails since https://github.com/dlang/dmd/pull/11039:
```
 safe:
void assertFalse(scope int[] x)
{
    assert(!x);
}

void main() 
{
    assertFalse([]);
}
```

Found here:
https://github.com/nomad-software/dunit/blob/7aabca699cbfe32581754b19a2b93d1b4178ebdc/source/dunit/toolkit.d#L474

--
May 10 2022