-
-
Notifications
You must be signed in to change notification settings - Fork 166
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
Feat: not implement keyof this #1059
Conversation
Thank you for the PR! Files to checkThese are files which is affected by the current PR, but not reflected. If there's no file below this message, please ignore this message. You can run
|
.into_owned(); | ||
|
||
return Ok(Cow::Owned(ty)); | ||
// TODO(): scope of normalize should be obj_ty scope |
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.
Other than with_child, is there a better way to specify the scope as that object?
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.
You mean you only want to change scope.this
?
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.
If so, I simply modifed self.scope.this
like
self.scope.this = old_this; |
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.
If you want to ensure that you don't forget resetting self.scope.this
, you can do like
let old_this = self.scope.this.take();
self.scope.this = new_this;
let result = (|| {
// your code.
})();
self.scope.this = old_this;
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 want a scope outside of the traditional context.
Like when you call a closure, the closure doesn't use the caller's scope.
Of course, it's fine to do it now or with the code you suggested for now.
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.
Thanks!
Description:
implement
keyof this
Related issue (if exists):