mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-05-03 03:00:14 -04:00
Fixes #1461. Existential assignment now correctly reports if it is a statement.
This commit is contained in:
@@ -911,6 +911,9 @@ exports.Assign = class Assign extends Base
|
||||
|
||||
children: ['variable', 'value']
|
||||
|
||||
isStatement: (o) ->
|
||||
o?.level is LEVEL_TOP and "?" in @context
|
||||
|
||||
assigns: (name) ->
|
||||
@[if @context is 'object' then 'value' else 'variable'].assigns name
|
||||
|
||||
|
||||
Reference in New Issue
Block a user