Skip to content

Commit 3453bfa

Browse files
regression tests for #1274
1 parent 31ae260 commit 3453bfa

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

test/array_literals.coffee

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,8 @@ test "array splats with nested arrays", ->
7070
list = [1, 2, a...]
7171
arrayEq list, [1, 2, [nonce]]
7272

73+
test "#1274: `[] = a()` compiles to `false` instead of `a()`", ->
74+
a = false
75+
fn = -> a = true
76+
[] = fn()
77+
ok a

test/object_literals.coffee

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,3 +210,8 @@ test "some weird indentation in YAML-style object literals", ->
210210
f: 1
211211
eq 1, obj[1]
212212

213+
test "#1274: `{} = a()` compiles to `false` instead of `a()`", ->
214+
a = false
215+
fn = -> a = true
216+
{} = fn()
217+
ok a

0 commit comments

Comments
 (0)