-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Console output for class instance __proto__ seems wrong #33419
Labels
Comments
@hashseed do you have a suggestion how to differentiate these easily? We currently check for the constructor and that does not seem to be sufficient. Since you might already know how to improve the check, this could safe me some time digging into this. |
4 tasks
BridgeAR
added a commit
to BridgeAR/node
that referenced
this issue
May 23, 2020
To achieve this, some internal custom inspect functions had to be changed. They relied upon the former behavior. Fixes: nodejs#33419 Signed-off-by: Ruben Bridgewater <[email protected]> PR-URL: nodejs#33449 Reviewed-By: Anto Aravinth <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
codebytere
pushed a commit
that referenced
this issue
Jun 18, 2020
To achieve this, some internal custom inspect functions had to be changed. They relied upon the former behavior. Signed-off-by: Ruben Bridgewater <[email protected]> PR-URL: #33449 Fixes: #33419 Reviewed-By: Anto Aravinth <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
codebytere
pushed a commit
that referenced
this issue
Jun 30, 2020
To achieve this, some internal custom inspect functions had to be changed. They relied upon the former behavior. Signed-off-by: Ruben Bridgewater <[email protected]> PR-URL: #33449 Fixes: #33419 Reviewed-By: Anto Aravinth <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Consider following code
Node 14 produces:
This is wrong since
(new B()).__proto__
is an instance ofA
. I guess the confusing part is that(new B()).__proto__.constructor
isclass B
(which is because of https://tc39.es/ecma262/#sec-makeconstructor)For reference, Chrome DevTools produces:
The text was updated successfully, but these errors were encountered: