-
Notifications
You must be signed in to change notification settings - Fork 1.8k
JS: Use the new non-extending-subtypes syntax #5888
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
Conversation
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
@@ -826,7 +826,7 @@ module NodeJSLib { | |||
* for example `http.request(url)`. | |||
*/ | |||
class NodeJSClientRequest extends ClientRequest { | |||
override NodeJSClientRequest::Range self; | |||
NodeJSClientRequest() { this instanceof NodeJSClientRequest::Range } |
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 a reason we can't use instanceof
in the base type here?
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.
I suppose not.
ClientRequest
is already instance of the ::Range
pattern, so I suppose I didn't want to introduce "nested" ::Range
patterns.
But it should just work, so I've changed it.
Is this comment (and similar ones) still correct?
|
Yes. |
I grepped through the JavaScript QL for
::Range
, and first I converted them all to the casting-based::Range
pattern, and next to the new syntax.I think I got most, but I might have missed some.
Evaluation looks fine.
(No noticeable performance change, no change in results).
/cc @ginsbach