[Issue 24575] New: sumtype fails to match lambdas with anonymous arguments
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri May 31 21:48:13 UTC 2024
https://issues.dlang.org/show_bug.cgi?id=24575
Issue ID: 24575
Summary: sumtype fails to match lambdas with anonymous
arguments
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: enhancement
Priority: P1
Component: phobos
Assignee: nobody at puremagic.com
Reporter: crazymonkyyy at gmail.com
```d
import std;
struct tree(T){
alias node=typeof(this)[2]*;
SumType!(T,node) data;
bool isleaf()=>
data.match!(
(T)=>true,
(node)=>false);
}
unittest{
tree!int foo;
}
```
adding names to the lamdas arguments cause it to compile
--
More information about the Digitalmars-d-bugs
mailing list