Lint ES AO invocations for correct usage of !/? #2238
Labels
enhancement
project-consistency-checking
Includes checking algorithm arguments, variable types, field access, etc.
Once tc39/ecma262#2675 lands, other specs will have easy access to type signatures of ECMAScript abstract operations. It would be useful to build in a linting phase in bikeshed that does extra checking of the invocations of AOs that return completions. Such invocations must be annotated in one of three ways:
!
, meaning asserting that only normal completions are returned and unwrapping the returned value within the Completion Record.?
, meaning doing early returns on abrupt completions and unwrapping the returned value within the Completion Record on normal completions.Completion(...)
, meaning manual processing is done in a later step./cc other TC39 editors @bakkot and @michaelficarra
The text was updated successfully, but these errors were encountered: