Skip to content

Scoverage: do not instrument erased values. - #25298

Merged
Gedochao merged 1 commit into
scala:mainfrom
anatoliykmetyuk:scoverage-erasure
Feb 27, 2026
Merged

Scoverage: do not instrument erased values.#25298
Gedochao merged 1 commit into
scala:mainfrom
anatoliykmetyuk:scoverage-erasure

Conversation

@anatoliykmetyuk

Copy link
Copy Markdown
Contributor

Otherwise, during erasure phase, they will be impure and emit an error. Purity constraint is needed in the context of capabilities, which are erased and can only be pure values.

Enable related ignored tests.

@anatoliykmetyuk
anatoliykmetyuk force-pushed the scoverage-erasure branch 3 times, most recently from 0257789 to 5a58094 Compare February 18, 2026 16:52
Otherwise, during erasure phase, they will be impure
and emit an error. Purity constraint is needed in the
context of capabilities, which are erased and can only
be pure values.

Enable related ignored tests.

Update baselines for failing coverage tests.
@anatoliykmetyuk
anatoliykmetyuk marked this pull request as ready for review February 19, 2026 00:43

@SolalPirelli SolalPirelli left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I am still new to this part of the compiler but it looks reasonable, left a suggestion

Comment thread compiler/src/dotty/tools/dotc/transform/InstrumentCoverage.scala
@anatoliykmetyuk

Copy link
Copy Markdown
Contributor Author

@Gedochao the PR is approved - could you please let me know what the process is from here to get it merged?

@Gedochao

Copy link
Copy Markdown
Contributor

Tagging the reviewer after fixes are in place is generally what works 😅
LGTM, anyways.

@Gedochao
Gedochao merged commit b176037 into scala:main Feb 27, 2026
60 checks passed
@anatoliykmetyuk
anatoliykmetyuk deleted the scoverage-erasure branch February 27, 2026 08:33
tgodzik added a commit to scala/scala3-lts that referenced this pull request Mar 18, 2026
Otherwise, during erasure phase, they will be impure and emit an error.
Purity constraint is needed in the context of capabilities, which are
erased and can only be pure values.

Enable related ignored tests.
[Cherry-picked b176037][modified]
@WojciechMazur WojciechMazur added this to the 3.8.4 milestone Mar 31, 2026
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.

5 participants