archives

« Bugzilla Issues Index

#4152 — ArrowParameters not strict


The ArrowFormalParameters are strict but the single binding identifier is not. This means that:

static => 1;

is valid but:

(static) => 1;

is not.

That is kind of weird.


How do you figure?

The only static semantic rule for StrictFormalParameters is in 14.1.2 and says that there can't be any duplicate parameter names.

I suppose StrictFormalParameters is a misleading name as it really has nothing to do with strict mode. The strict mode of an arrow function is determined in the usual way (either contained in strict code or its body has a "use strict" directive.


This always gets me.

The name always gets me thinking that the strict mode rules for FormalParameters should be applied.

A different name might help but I can't think of anything... Maybe NoDuplicatesFormalParameters to be explicit?


SlightlyStrictFormalParameters ??


DistinctFormalParameters ?