[Issue 24470] New: Type safe variadic arguments of delegates cause implicit conversion into lazy
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Mar 31 01:14:28 UTC 2024
https://issues.dlang.org/show_bug.cgi?id=24470
Issue ID: 24470
Summary: Type safe variadic arguments of delegates cause
implicit conversion into lazy
Product: D
Version: D2
Hardware: x86
OS: Windows
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: msnmancini at hotmail.com
I was just testing into trying to have lazy variadic array of delegates without
having to type the delegate manually, I showed people and they proved that this
is a bug.
```d
void anotherTest(scope void delegate()[] dg...)
{
import std.range;
foreach(d; dg.retro)
d();
}
void main()
{
anotherTest(
writeln("Hello"),
writeln("World")
);
}
```
--
More information about the Digitalmars-d-bugs
mailing list