Skip to content
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

Editorial: Add an Assertion for Built-in Function Object #3483

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kimjg1119
Copy link
Contributor

In Construct method for built-in function object, it seems that the result must be an object. However, current ESMeta is unable to check this since BuiltinCallOrConstruct handles Call and Construct together.

It will be helpful to add an assertion to resolve a false alarm.

ESMeta alarm:

[ReturnTypeMismatch] Block[6404] return statement in Record[BuiltinFunctionObject].Construct (step 1, 2:12-96)
- expected: Normal[Record[Object]] | Throw
- actual  : Normal[ESValue] | Throw

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editor call to be discussed in the next editor call
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants