Skip to content

Commit 00f9e24

Browse files
committed
Fixes #1922
1 parent eb55f2d commit 00f9e24

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

lib/coffee-script/rewriter.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/rewriter.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ class exports.Rewriter
152152
[tag] = token
153153
return yes if not seenSingle and token.fromThen
154154
seenSingle = yes if tag in ['IF', 'ELSE', 'CATCH', '->', '=>']
155-
seenControl = yes if tag in ['IF', 'ELSE', 'SWITCH', 'TRY']
155+
seenControl = yes if tag in ['IF', 'ELSE', 'SWITCH', 'TRY', '=']
156156
return yes if tag in ['.', '?.', '::'] and @tag(i - 1) is 'OUTDENT'
157157
not token.generated and @tag(i - 1) isnt ',' and (tag in IMPLICIT_END or
158158
(tag is 'INDENT' and not seenControl)) and

test/operators.coffee

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,3 +263,9 @@ test "#1102: String literal prevents line continuation", ->
263263
test "#1703, ---x is invalid JS", ->
264264
x = 2
265265
eq (- --x), -1
266+
267+
test "#1.1.3: Regression with implicit calls against an indented assignment", ->
268+
eq 1, a =
269+
1
270+
271+
eq a, 1

0 commit comments

Comments
 (0)