Bug 23599 – tuples not expanded in struct initializer

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2023-01-04T10:19:01Z
Last change time
2024-12-13T19:26:35Z
Assigned to
No Owner
Creator
Dennis
Moved to GitHub: dmd#20210 →

Comments

Comment #0 by dkorpel — 2023-01-04T10:19:01Z
Found while implementing named arguments: https://github.com/dlang/dmd/pull/14776#issuecomment-1369269255 ``` struct S { int x, y; } alias Seq(T...) = T; void f() { S s0 = S( Seq!(1, 2) ); // < works S s1 = { Seq!(1, 2) }; // < error } ``` > Error: cannot implicitly convert expression `tuple(1, 2)` of type `(int, int)` to `int`
Comment #1 by robert.schadek — 2024-12-13T19:26:35Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/20210 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB