Skip to content

Conversation

@hamzaremmal
Copy link
Member

All s, f and raw interpolators 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.

Copy link
Member Author

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
Copy link
Member Author

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.

@hamzaremmal hamzaremmal changed the title chore: StringContext methods are not macros Scala 2 macros anymore chore: StringContext methods are not Scala 2 macros anymore Nov 13, 2025
@hamzaremmal hamzaremmal added the backport:nominated If we agree to backport this PR, replace this tag with "backport:accepted", otherwise delete it. label Nov 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:nominated If we agree to backport this PR, replace this tag with "backport:accepted", otherwise delete it.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant