tc39 / proposal-explicit-resource-management

ECMAScript Explicit Resource Management
https://arai-a.github.io/ecma262-compare/?pr=3000
BSD 3-Clause "New" or "Revised" License
725 stars 29 forks source link

Move BindingPattern restriction for 'using' to an early error #145

Closed rbuckton closed 1 year ago

rbuckton commented 1 year ago

Per editor feedback in https://github.com/tc39/proposal-async-explicit-resource-management/issues/9, this moves the BindingPattern restriction for using declarations to an Early Error to avoid ambiguity from using the Using parameter in two different ways. The early error condition is roughly equivalent to how const declarations report an early error on a missing Initializer.

github-actions[bot] commented 1 year ago

A preview of this PR can be found at https://tc39.es/proposal-explicit-resource-management/pr/145.