Skip to content

Emit a super init call for primitives on the JVM - #26630

Open
SolalPirelli wants to merge 1 commit into
scala:mainfrom
dotty-staging:solal/int
Open

Emit a super init call for primitives on the JVM#26630
SolalPirelli wants to merge 1 commit into
scala:mainfrom
dotty-staging:solal/int

Conversation

@SolalPirelli

Copy link
Copy Markdown
Contributor

Fixes #26576

Since this is a JVM-specific requirement, I did it in the JVM backend. We could also change Mixin.transformTemplate to remove the special-casing of primitive value classes, but this would require other changes, and it seems wrong to, e.g., tell Scala.js to include a call to scala.AnyVal or j.l.Object's init in scala.Int's init.

Have you relied on LLM-based tools in this contribution?

No

How was the solution tested?

New automated tests (including the issue's reproducer, if applicable)

val pool = JExecutors.newWorkStealingPool(threadLimit.getOrElse(Runtime.getRuntime.availableProcessors()))
val timer = new Timer()
val logProgress = isInteractive && !suppressAllOutput
val logProgress = sourceCount > 1 && isInteractive && !suppressAllOutput

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no point in a progress bar when running a single test and it's annoying for prints.

@SolalPirelli
SolalPirelli marked this pull request as ready for review July 27, 2026 09:50
@SolalPirelli SolalPirelli added this to the 3.9.0 milestone Jul 27, 2026
@SolalPirelli SolalPirelli added the backport:nominated If we agree to backport this PR, replace this tag with "backport:accepted", otherwise delete it. label Jul 27, 2026
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.

VerifyError for scala.Int constructor

2 participants