[Issue 7014] Better union initialization syntax

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Sep 23 17:27:18 UTC 2024


https://issues.dlang.org/show_bug.cgi?id=7014

Nick Treleaven <nick at geany.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |nick at geany.org
         Resolution|---                         |FIXED

--- Comment #4 from Nick Treleaven <nick at geany.org> ---
(In reply to bearophile_hugs from comment #0)
> union Foo { int s; uint u; };
> void bar(Foo f) {}
> void main() {
>     bar(Foo(u:5));
> }

That is implemented as of:
https://dlang.org/changelog/2.108.0.html#dmd.named-arguments

--


More information about the Digitalmars-d-bugs mailing list