Fix #4487: Outdentation bug (#4488)

This commit is contained in:
Julian Rosse
2017-04-08 16:12:55 -04:00
committed by Geoffrey Booth
parent b192e215a5
commit 76945ab458
3 changed files with 23 additions and 12 deletions

View File

@@ -287,3 +287,20 @@ test "tabs and spaces cannot be mixed for indentation", ->
ok no
catch e
eq 'mixed indentation', e.message
test "#4487: Handle unusual outdentation", ->
a =
switch 1
when 2
no
when 3 then no
when 1 then yes
eq yes, a
b = do ->
if no
if no
1
2
3
eq b, undefined