[Issue 23100] New: empty array literal passed to scope param not 'falsey' anymore
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue May 10 10:56:51 UTC 2022
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 at puremagic.com
Reporter: dkorpel at 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
--
More information about the Digitalmars-d-bugs
mailing list