mirror of
https://github.com/jashkenas/coffeescript.git
synced 2022-11-09 12:23:24 -05:00
Merge pull request #2711 from troels/fix-1435
Fix #1435 by amending away sign reversal.
This commit is contained in:
commit
3d3fe0df34
2 changed files with 13 additions and 1 deletions
|
@ -309,7 +309,7 @@ exports.Lexer = class Lexer
|
||||||
@outdebt -= @indents[len]
|
@outdebt -= @indents[len]
|
||||||
moveOut -= @indents[len]
|
moveOut -= @indents[len]
|
||||||
else
|
else
|
||||||
dent = @indents.pop() - @outdebt
|
dent = @indents.pop() + @outdebt
|
||||||
moveOut -= dent
|
moveOut -= dent
|
||||||
@outdebt = 0
|
@outdebt = 0
|
||||||
@pair 'OUTDENT'
|
@pair 'OUTDENT'
|
||||||
|
|
|
@ -213,3 +213,15 @@ test "#2621: fancy destructuring in parameter lists", ->
|
||||||
eq(a, 'a')
|
eq(a, 'a')
|
||||||
|
|
||||||
func({prop1: {key1: 'key1'}, prop2: {key2: 'key2', key3: ['a', 'b', 'c']}})
|
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