mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-05-03 03:00:14 -04:00
invalid destructuring assignments like {0} = x now causes syntax error
This commit is contained in:
@@ -59,3 +59,8 @@ val = null
|
||||
val ?= 'value'
|
||||
val ?= 'eulav'
|
||||
eq val, 'value'
|
||||
|
||||
|
||||
for nonident in ['""', '0']
|
||||
try ok not CoffeeScript.compile "{#{nonident}} = x"
|
||||
catch e then eq e.message, nonident + ' cannot be assigned.'
|
||||
|
||||
Reference in New Issue
Block a user