Add valueOf methods to the Temporal builtins#4079
Conversation
Test262 conformance changes
Fixed tests (227):Broken tests (137): |
hansl
left a comment
There was a problem hiding this comment.
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. |
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.
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".
This Pull Request is related to the general work on #1804
It changes the following:
prototype.valueOfmethod implementation to the Temporal builtins