mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-01-14 09:17:55 -05:00
Check for invalid implicit values
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user