From 3980f5fc8563ffa1fb73b0d5c11910dd3175b0bc Mon Sep 17 00:00:00 2001 From: Sainan Date: Fri, 7 Apr 2023 21:45:28 +0200 Subject: [PATCH] Add test for destructuring with custom variable name --- tests/basic.pluto | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/basic.pluto b/tests/basic.pluto index 9427a894bf..04e683aced 100644 --- a/tests/basic.pluto +++ b/tests/basic.pluto @@ -1002,11 +1002,13 @@ do end do -- Temporary table - local { i, f } = { + local { i, str = s } = { i = 69, s = "Hello" } assert(i == 69) + assert(s == nil) + assert(str == "Hello") end do -- Temporary table, single field