Skip to content

use new rather than apply in Scala 3 #176

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

Merged
merged 1 commit into from
Sep 11, 2024
Merged

Conversation

bishabosha
Copy link
Contributor

@bishabosha bishabosha commented Sep 11, 2024

Scala 2 macros expand to e.g. new sourcecode.Line(2).

To maintain compatibility with other tools such as Mill's CodeSig analyzer, we should directly call the constructor, rather than the companion's apply method e.g. sourcecode.Line.apply(2)

Scala 2 macros expand to e.g. `new sourcecode.Line(2)`.

To maintain compatibility with other tools such as Mill, we should directly call the constructor, rather than the companion's `apply` method e.g. `sourcecode.Line.apply(2)`
@lihaoyi lihaoyi merged commit 1dae28d into com-lihaoyi:main Sep 11, 2024
4 checks passed
@lihaoyi
Copy link
Member

lihaoyi commented Sep 11, 2024

@bishabosha I pushed a tag 0.4.3-M1, hopefully will get published later today as it makes its way through our CI queue

@bishabosha
Copy link
Contributor Author

Thanks!

@bishabosha bishabosha deleted the patch-1 branch September 11, 2024 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants