mirror of
https://github.com/jashkenas/coffeescript.git
synced 2022-11-09 12:23:24 -05:00
Check for invalid implicit values
This commit is contained in:
parent
d0f13223bc
commit
d200619774
1 changed files with 4 additions and 1 deletions
|
@ -717,8 +717,11 @@ exports.Obj = class Obj extends Base
|
|||
|
||||
compileNode: (o) ->
|
||||
props = @properties
|
||||
props = props.filter ((x) -> x not instanceof Value) if @generated
|
||||
return (if @front then '({})' else '{}') unless props.length
|
||||
if @generated
|
||||
for node in props
|
||||
if node instanceof Value
|
||||
throw new Error 'No implicit values in implict objects allowed'
|
||||
idt = o.indent += TAB
|
||||
lastNoncom = @lastNonComment @properties
|
||||
props = for prop, i in props
|
||||
|
|
Loading…
Add table
Reference in a new issue