[Issue 23769] New: Lambda isn't a unary predicate for lambda that doesn't compile
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Mar 10 13:51:31 UTC 2023
https://issues.dlang.org/show_bug.cgi?id=23769
Issue ID: 23769
Summary: Lambda isn't a unary predicate for lambda that doesn't
compile
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: grimmaple95 at gmail.com
class A{
bool t;
}
void main()
{
A[] a = new A[100];
writeln(a.all!(x => x.b));
}
This code errors at compile with:
/dlang/dmd/linux/bin64/../../src/phobos/std/algorithm/searching.d(124): Error:
static assert: "`__lambda2` isn't a unary predicate function for range.front"
onlineapp.d(10): instantiated from here: `all!(A[])`
It should just output that the lambda doesn't compile.
I'm not sure if it's related to https://issues.dlang.org/show_bug.cgi?id=11907
--
More information about the Digitalmars-d-bugs
mailing list