polserver/testsuite/escript/spread/doc-sample-5.src
Kevin Eady 6c7a2b0a30
Add support for spread operator in dictionary and struct initializers; FormatterEllipsisSpacing formatter option (#763)
* update grammar

* implementation

* formatting

* executor implementation, tests

* docs, core-changes

* fix warning introduced in #760

* add format option FormatterEllipsisSpacing

* update core-changes
2025-02-19 18:33:56 +01:00

5 lines
No EOL
199 B
Text

var dict1 := dictionary{ "a" -> 1, "b" -> 2 };
var dict2 := dictionary{ "b" -> 3, "c" -> 4 };
var dict := dictionary{ dict1..., dict2... };
Print( dict ); // Output: { "a" -> 1, "b" -> 3, "c" -> 4 }