Commit graph

2 commits

Author SHA1 Message Date
Dennis
42609ae98e
Add named arguments to struct literals (#14776)
* Add named argument parsing

* Refactor StructInitializer semantic to make it reusable

* Move out `resolveStructLiteralNamedArgs`

* Resolve named args in struct literal

* Add tests

* Check for errors returned by `resolveStructLiteralNamedArgs`

* Expand names along with tuples

* Update error messages in tests

* Convert tabs to spaces in named arg test

* Fix style of `resolveStructLiteralNamedArgs`

* Clarify 'fixme' comment in expandTuples

* Add example to `expandTuples` documentation

* Update compiler/src/dmd/initsem.d

Co-authored-by: Razvan Nitu <razvan.nitu1305@gmail.com>

* Add overlapping initialization supplemental error to Struct Initializer

* Improve "too many initializers" error message

Co-authored-by: Razvan Nitu <razvan.nitu1305@gmail.com>
2023-01-17 13:08:30 +01:00
Iain Buclaw
6374bb87b7 Move dmd files into compiler/ 2022-07-09 18:53:07 +02:00
Renamed from test/fail_compilation/fail156.d (Browse further)