-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Fixes and improvements to erasure #11695
Merged
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
0d70a4a
Streamline feature handling in Parser
odersky 0d48ba0
Add language import for erasedTerms
odersky 513e95d
Fix problem when erasing erased context functions
odersky f9ffafd
Eliminate -YerasedTerms
odersky 6944fc6
Bring back -Yerased-terms for bootstrapping
odersky 53793ae
Fixes for turning erased into a soft modifier
odersky 5a62261
Allow erased on classes
odersky 8c42294
Check that no references to erased classes survive
odersky 1223ea2
Explain erased classes in doc page
odersky 7c4e3a9
Make tests variance aware
odersky 310d87e
Replace -Yerased-terms with -language:experimental.erasedTerms in std…
odersky 07a47f1
Update check file
odersky 313221a
Rename macros feature to scala2macros
odersky 799f6e4
Also erase methods with erased class results
odersky 1558591
Semi-erase classes
odersky d4e477c
Another test
odersky d2b2ddd
Allow erased as extension parameter
odersky f946c4b
Rename erasedTerms language import to erasedDefinitions
odersky 0af3f59
Update stdlib to erasedDefinitions language import
odersky File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Submodule stdLib213
updated
2 files
+1 −1 | project/DottySupport.scala | |
+1 −1 | src/tastytest/scala/tools/tastytest/Dotc.scala |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -925,7 +925,7 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) { | |
else PrintableFlags(isType) | ||
if (homogenizedView && mods.flags.isTypeFlags) flagMask &~= GivenOrImplicit // drop implicit/given from classes | ||
val rawFlags = if (sym.exists) sym.flags else mods.flags | ||
if (rawFlags.is(Param)) flagMask = flagMask &~ Given | ||
if (rawFlags.is(Param)) flagMask = flagMask &~ Given &~ Erased | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We might also want to remove There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, inline is per param, not per clause |
||
val flags = rawFlags & flagMask | ||
var flagsText = toTextFlags(sym, flags) | ||
val annotations = | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Erased is not only about definitions. It is also about the term values they provide. This is completely lost with this new name. The
erased class
concept is also about erasing term definitions and uses as arguments. Therefore, the scope of the feature has not really changed.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.
But
erased
is a modifier on a definition, not a term. Anyway, people usually do not know what a term is. We'd have to sayerasedExpressions
, but I believeDefinitions
is preferable, since that's where the erased goes.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.
The fact that if you erase a definition you also erase its RHS, and if you erase a parameter, you also erase its argument follows naturally since it's the only thing that makes sense. But the trigger is the
erased
on a definition. Or parameter, but I think it's OK to include that in the meaning.