May 31, 2024 [Issue 24575] New: sumtype fails to match lambdas with anonymous arguments | ||||
---|---|---|---|---|
| ||||
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@puremagic.com Reporter: crazymonkyyy@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 -- |
Copyright © 1999-2021 by the D Language Foundation