Skip to content

Commit

Permalink
Merge pull request #949 from rhendric/fix/LiveScript-930
Browse files Browse the repository at this point in the history
fix #930
  • Loading branch information
gkz authored Mar 8, 2017
2 parents 3902c23 + 0223952 commit 68e5755
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/ast.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/ast.ls
Original file line number Diff line number Diff line change
Expand Up @@ -1012,7 +1012,7 @@ class exports.Obj extends List
continue if node.comment
if node instanceof [Prop, Splat]
node[name = node.children[*-1]] =
chain = Chain base, [Index node[name]maybe-key!]
chain = Chain base, [Index node[name]maybe-key!, symbol]
else
# `o{k or v}` => `{k: a.k or v}`
node.=first if logic = node.get-default!
Expand Down
1 change: 1 addition & 0 deletions test/chaining.ls
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ eq 42, do(0; parent.child.~method)
eq 42, do(0; parent.child~"me#{'th'}od")
eq 42, parent.child. ~ [\method] null
eq 42, parent.child.~{method}.method!
eq 42, parent.child.~{renamed:method}.renamed!
eq "42" 42~toString!

compileThrows 'invalid assign' 1 'o~m=g'
Expand Down

0 comments on commit 68e5755

Please sign in to comment.