mirror of
https://github.com/jashkenas/coffeescript.git
synced 2022-11-09 12:23:24 -05:00
Fix #1435 by amending away sign reversal.
This commit is contained in:
parent
9ed804d9b1
commit
a320e1e535
2 changed files with 13 additions and 1 deletions
|
@ -309,7 +309,7 @@ exports.Lexer = class Lexer
|
|||
@outdebt -= @indents[len]
|
||||
moveOut -= @indents[len]
|
||||
else
|
||||
dent = @indents.pop() - @outdebt
|
||||
dent = @indents.pop() + @outdebt
|
||||
moveOut -= dent
|
||||
@outdebt = 0
|
||||
@pair 'OUTDENT'
|
||||
|
|
|
@ -213,3 +213,15 @@ test "#2621: fancy destructuring in parameter lists", ->
|
|||
eq(a, 'a')
|
||||
|
||||
func({prop1: {key1: 'key1'}, prop2: {key2: 'key2', key3: ['a', 'b', 'c']}})
|
||||
|
||||
test "#1435 Indented property access", ->
|
||||
rec = -> rec: rec
|
||||
|
||||
eq 1, do ->
|
||||
rec()
|
||||
.rec ->
|
||||
rec()
|
||||
.rec ->
|
||||
rec.rec()
|
||||
.rec()
|
||||
1
|
||||
|
|
Loading…
Add table
Reference in a new issue