-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Refactorings and fixes to erased definition handling #23404
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,23 @@ | |
# - description (can be multi-line) | ||
# '' sign | ||
# ------------------------------------------ | ||
0 | ||
macro-late-suspend/UsesTest.scala | ||
example | ||
UsesTest$package | ||
Object | ||
example.UsesTest$package | ||
<init> | ||
22 | ||
22 | ||
3 | ||
<none> | ||
Literal | ||
true | ||
0 | ||
false | ||
|
||
|
||
Comment on lines
+21
to
+37
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. I'm not sure what this test does. Is it important that the output changes? 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. I am not sure. It might have to do with the fact that we don't delete code in PruneErasedDefs anymore. But if anything this hshould be more precise now. |
||
1 | ||
macro-late-suspend/VisitorMacros.scala | ||
example | ||
|
@@ -69,20 +86,3 @@ false | |
false | ||
mkVisitorType[Test] | ||
|
||
4 | ||
macro-late-suspend/UsesTest.scala | ||
example | ||
UsesTest$package | ||
Object | ||
example.UsesTest$package | ||
<init> | ||
22 | ||
22 | ||
3 | ||
<none> | ||
Literal | ||
true | ||
0 | ||
false | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import language.experimental.erasedDefinitions | ||
|
||
inline def id[T](x: T) = x | ||
|
||
class C() | ||
|
||
def foo[T](erased x: T): Unit = () | ||
|
||
class Pair[A, B](x: A, y: B) | ||
|
||
|
||
def Test = | ||
foo(C()) | ||
foo(id(C())) | ||
foo(Pair(C(), C())) | ||
foo(Pair(C(), 22)) | ||
foo(Pair(C(), "hello" + "world")) | ||
foo(id(Pair(id(C()), id("hello" + "world")))) | ||
|
||
|
||
|
||
|
||
|
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.
This seems to be a random change
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, it's not needed elsewhere though.