Fixes #1461. Existential assignment now correctly reports if it is a statement.

This commit is contained in:
Timothy Jones
2011-06-26 03:08:38 +12:00
parent baa983ac33
commit e38aeefb5c
2 changed files with 6 additions and 0 deletions

View File

@@ -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