Skip to content

Commit

Permalink
Merge pull request #7 from pzuraq/throw-error-if-initializer-is-not-c…
Browse files Browse the repository at this point in the history
…allable

Throw an error if the value passed to `addInitializer` is not callable
  • Loading branch information
pzuraq authored Apr 12, 2023
2 parents e86128e + a2b63dd commit ca35c74
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -24261,6 +24261,7 @@ <h1>
<emu-alg>
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, *""*, « »).
Expand Down

0 comments on commit ca35c74

Please sign in to comment.