-
Notifications
You must be signed in to change notification settings - Fork 1.1k
chore: StringContext methods are not Scala 2 macros anymore
#24407
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
base: main
Are you sure you want to change the base?
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.
Purpose was to check that we can still call them even if they were considered Scala 2 macros. This is not the case anymore.
| @@ -1,3 +0,0 @@ | |||
| class Foo extends StringContext { | |||
| override inline def f[A >: Any](args: A*): String = ??? // error | |||
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.
It is not a Scala 2 macro anymore, the test changed to use a custom Scala 2 Macro instead and be independent of the stdlib.
StringContext methods are not macros Scala 2 macros anymoreStringContext methods are not Scala 2 macros anymore
a4cb81f to
31c77d5
Compare
|
blocked by sbt/sbt#8376 |
31c77d5 to
654b1f5
Compare
| ProblemFilters.exclude[DirectMissingMethodProblem]("scala.StringContext.s"), | ||
| ProblemFilters.exclude[DirectMissingMethodProblem]("scala.StringContext.raw"), | ||
| ProblemFilters.exclude[DirectMissingMethodProblem]("scala.StringContext.f"), |
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 is fine since it will be backported to 3.8.0
All
s,fandrawinterpolators were considered Scala 2 macros in the past. This is now not the case and we define them as normal methods.For Scala 3.8.0, this will not be the case anymore. Those methods are normal methods and are a compiler intrinsic (as before).
Part of removing unnecessary special handling.