Merge pull request #2599 from H2rmone/master

fix(classes): replace [[FunctionKind]] with [[IsClassConstructor]]
This commit is contained in:
Ilya Kantor 2021-05-13 16:22:40 +03:00 committed by GitHub
commit 339535d450
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -144,7 +144,7 @@ The result of this definition is about the same. So, there are indeed reasons wh
Still, there are important differences. Still, there are important differences.
1. First, a function created by `class` is labelled by a special internal property `[[FunctionKind]]:"classConstructor"`. So it's not entirely the same as creating it manually. 1. First, a function created by `class` is labelled by a special internal property `[[IsClassConstructor]]: true`. So it's not entirely the same as creating it manually.
The language checks for that property in a variety of places. For example, unlike a regular function, it must be called with `new`: The language checks for that property in a variety of places. For example, unlike a regular function, it must be called with `new`: