-
-
Notifications
You must be signed in to change notification settings - Fork 410
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
Add valueOf methods to the Temporal builtins #4079
Conversation
Test262 conformance changes
Fixed tests (227):
Broken tests (137):
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there or should there be an issue/task for adding a proper valueOf
implementation?
What do you mean by proper There's not a specific issue open, but there is a host of tracking issues that this would complete the Boa implementation for those issues. I believe this should be to spec for the Temporal proposal. |
Don't mind me, I was not looking at the right spec. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
a08d0e6
to
e2942df
Compare
|
||
pub(crate) fn value_of(_this: &JsValue, _: &[JsValue], _: &mut Context) -> JsResult<JsValue> { | ||
Err(JsNativeError::typ() | ||
.with_message("valueOf not implemented for Temporal objects. See 'compare', 'equals', or `toString`") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I'm a bit negative about the "not implemented" phrasing because it seems like we haven't implemented it yet. Maybe something like "valueOf
is not supported on Temporal objects".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
This Pull Request is related to the general work on #1804
It changes the following:
prototype.valueOf
method implementation to the Temporal builtins