Skip to content

Commit

Permalink
Merge pull request #894 from misterfish/issue-751
Browse files Browse the repository at this point in the history
Issue 751
  • Loading branch information
gkz authored Jun 23, 2016
2 parents 87daae6 + ad03579 commit 97d7706
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/ast.js

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

1 change: 1 addition & 0 deletions src/ast.ls
Original file line number Diff line number Diff line change
Expand Up @@ -2674,6 +2674,7 @@ class exports.If extends Node
# A labeled block or statement.
class exports.Label extends Node
(@label or \_, @it) ->
@carp "can't use label with a curried function (attempted label '#{@label}')" if @it.curried
if fun = it instanceof [Fun, Class] and it or
it.calling and it.it.head
fun.name or fun <<< {name: @label, +labeled}
Expand Down
1 change: 1 addition & 0 deletions test/compilation.ls
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ compileThrows 'unmatched `]`' 3 '[{\n\n]}'

compileThrows 'missing `)CALL`' 1 'f('

compileThrows "can't use label with a curried function (attempted label 'abc')" 1 ':abc (a, b) --> a + b'

throws '''
empty range on line 1
Expand Down

0 comments on commit 97d7706

Please sign in to comment.