Skip to content

loop8: add a test for destructuring bind

Daniel Kochmański requested to merge add-test-loop-dbind into master

6.1.1.7 Destructuring states

Destructuring allows binding of a set of variables to a corresponding set
of values anywhere that a value can normally be bound to a single
variable. During loop expansion, each variable in the variable list is
matched with the values in the values list. If there are more variables in
the variable list than there are values in the values list, the remaining
variables are given a value of nil. If there are more values than
variables listed, the extra values are discarded.

These tests check, whether loop accepts destructuring bindings where there is less values than variables.

Merge request reports