mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-05-03 03:00:14 -04:00
Fix a confusing error message for '(arguments) ->'
This commit is contained in:
@@ -1684,7 +1684,7 @@
|
||||
this.name = name;
|
||||
this.value = value;
|
||||
this.splat = splat;
|
||||
if (name = (_ref3 = this.name.unwrapAll().value, __indexOf.call(STRICT_PROSCRIBED, _ref3) >= 0)) {
|
||||
if (_ref3 = (name = this.name.unwrapAll().value), __indexOf.call(STRICT_PROSCRIBED, _ref3) >= 0) {
|
||||
throw SyntaxError("parameter name \"" + name + "\" is not allowed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1230,7 +1230,7 @@ exports.Code = class Code extends Base
|
||||
# as well as be a splat, gathering up a group of parameters into an array.
|
||||
exports.Param = class Param extends Base
|
||||
constructor: (@name, @value, @splat) ->
|
||||
if name = @name.unwrapAll().value in STRICT_PROSCRIBED
|
||||
if (name = @name.unwrapAll().value) in STRICT_PROSCRIBED
|
||||
throw SyntaxError "parameter name \"#{name}\" is not allowed"
|
||||
|
||||
children: ['name', 'value']
|
||||
|
||||
Reference in New Issue
Block a user