ecma262 icon indicating copy to clipboard operation
ecma262 copied to clipboard

Editorial: EvaluateClassStaticBlockBody cannot throw during function instantiation

Open bakkot opened this issue 2 years ago • 0 comments

This changes a ? to a ! in EvaluateClassStaticBlockBody.

FunctionDeclarationInstantiation only throws if there is a parameter expression (computed member in destructuring, or default value) which throws. In this case the "function object" being evaluated is a synthetic value created by ClassStaticBlockDefinitionEvaluation which is used to explain how static blocks work (threaded through from ClassDefinitionEvaluation step 31.b.ii). This synthetic value does not have any parameters, so FunctionDeclarationInstantiation on it cannot throw.

bakkot avatar Oct 09 '22 20:10 bakkot