-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Add support for ref patterns
#6283
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
| base class Base { | ||
| var a: i32; | ||
|
|
||
| fn F[addr self: Self*](); |
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 it really worth preserving all the addr tests?
I had thought we fully planned to remove addr at this stage....
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.
Yes, removing addr is the plan, but I can't do that until I've migrated the prelude and C++ interop to use ref instead. Those changes aren't entirely trivial, so I'm trying to make incremental progress. As long as we still have addr, it seems preferable to keep the tests for it.
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.
OK, it jsut seems like a lot of churn to duplicate the test and then remove it.
But if it helps in the interim, sure. =]
I've not tried especially hard to review the addr tests though as they don't appear as branched from the original ones and so have no useful diff. Probably ok though.
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.
Yeah, the addr tests are just renames of the original tests.
This reverts commit 941917d.
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.
Seems like a reasonable increment, LG!
| base class Base { | ||
| var a: i32; | ||
|
|
||
| fn F[addr self: Self*](); |
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.
OK, it jsut seems like a lot of churn to duplicate the test and then remove it.
But if it helps in the interim, sure. =]
I've not tried especially hard to review the addr tests though as they don't appear as branched from the original ones and so have no useful diff. Probably ok though.
Support for
bound, and for thereftag on arguments, is left as future work.