From a2b63dd582175272da6a98caaab8d47186da28bf Mon Sep 17 00:00:00 2001 From: Chris Hewell Garrett Date: Mon, 6 Mar 2023 20:20:17 -0500 Subject: [PATCH] Throw an error if the value passed to `addInitializer` is not callable --- spec.html | 1 + 1 file changed, 1 insertion(+) diff --git a/spec.html b/spec.html index 869d68342b..90ca769872 100644 --- a/spec.html +++ b/spec.html @@ -24262,6 +24262,7 @@

1. Let _addInitializerClosure_ be a new Abstract Closure with parameters (_initializer_) that captures _initializers_ and _decorationState_ and performs the following steps when called: 1. If _decorationState_.[[Finished]] is *true*, throw a *TypeError* exception. + 1. If IsCallable(_initializer_) is *false*, throw a *TypeError* exception. 1. Append _initializer_ to _initializers_. 1. Return *undefined*. 1. Return CreateBuiltinFunction(_addInitializerClosure_, 1, *""*, « »).