Fix #1435 by amending away sign reversal.

This commit is contained in:
Troels Nielsen 2013-01-18 15:08:42 +01:00
parent 9ed804d9b1
commit a320e1e535
2 changed files with 13 additions and 1 deletions

View File

@ -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'

View File

@ -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