-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add specializing inline #5383
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 specializing inline #5383
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.
Hello, and thank you for opening this PR! 🎉
All contributors have signed the CLA, thank you! ❤️
Commit Messages
We want to keep history, but for that to actually be useful we have
some rules on how to format our commit messages (relevant xkcd).
Please stick to these guidelines for commit messages:
- Separate subject from body with a blank line
- When fixing an issue, start your commit message with
Fix #<ISSUE-NBR>:
- Limit the subject line to 72 characters
- Capitalize the subject line
- Do not end the subject line with a period
- Use the imperative mood in the subject line ("Add" instead of "Added")
- Wrap the body at 80 characters
- Use the body to explain what and why vs. how
adapted from https://chris.beams.io/posts/git-commit
Have an awesome day! ☀️
5a360ec
to
c8398e8
Compare
01ae482
to
fb919a5
Compare
fb919a5
to
221d337
Compare
Reverts the following commits: Join containsQuotesOrSplices and containsInlineCalls (reverted from commit 8cf1385) Make InlineCalls an object (reverted from commit ad26554) Remove Inlined and InlineProxy from TASTy (reverted from commit 976e095) Move inlining inside Reify quotes Split some neg tests as now only the first error is emitted. (reverted from commit 21e65f1) Erase rhs of erased non inlined val/def in PostTyper (reverted from commit c12e875) Add isInlineCall to TreeInfo (reverted from commit 954c25b) Update doc (reverted from commit 0832e02) Only run InlineCalls if the tree contains an inline call (reverted from commit f28e2e1) Check if unpickled tree has inline nodes (reverted from commit 927ae4e) Add a bit of documentation (reverted from commit da0c249) Fix constant folding during inlining (reverted from commit 32c8798) Move inline β-reduction after Pickler (reverted from commit c68dc1f) Normalize call at Inlined node creation (reverted from commit 746fdd7) Move inline β-reduction after post typer (reverted from commit 432eb0a) Move inline β-reduction out of typer (reverted from commit 6acaf31)
- add new syntax - an inline method with an explicit `: T` result type section has its rhs upcasted to its return type. It was an oversight that this was not done before.
This affects both RefinedPrinter and ShowSougrceCode. Another example of the tax we pay for maintaining both. It required Chars to be moved to scala.tasty.
This PR just adds
<: T
return type syntax for inline methods and handles upcasting properly. The body of aninline
method is upcasted to its return type, provided a return type is given with: T
(as opposed to
<: T
).We previously did not do this which meant that all inline methods had some degree of whiteboxity even though it was claimed otherwise.
This PR is based on #5382.