Skip to content

Scoverage & CC interaction: exempt CC nested symbols from @experimental check#25687

Open
anatoliykmetyuk wants to merge 1 commit intoscala:mainfrom
anatoliykmetyuk:fix/cc-experimental-coverage-exemption
Open

Scoverage & CC interaction: exempt CC nested symbols from @experimental check#25687
anatoliykmetyuk wants to merge 1 commit intoscala:mainfrom
anatoliykmetyuk:fix/cc-experimental-coverage-exemption

Conversation

@anatoliykmetyuk
Copy link
Copy Markdown
Contributor

Capture checking introduces some experimental symbols that are exempt from experimental checks with capture checking enabled. Currently, exemptions are only applied to the symbol itself, not its owner.

Coverage instrumentation introduces synthetic ValDefs which may expose capture checking symbols owned by experimental classes to experimental checks, bypassing the exemption.

This PR hardens the exemption to apply check the owner of the symbol as well.

How much have you relied on LLM-based tools in this contribution?

Moderately.

How was the solution tested?

  • Reproduced the two failing tests individually with coverage before the fix
  • Re-ran the same two tests with coverage after the fix and confirmed they pass
  • Ran positive & coverage compilation suites with the fix introduced

Coverage lifting creates synthetic ValDefs whose type trees expose
class-level TypeRefs (e.g. `class containsImpl`) to CrossVersionChecks.
These class symbols carry @experimental directly, bypassing the
ccExperimental exemption that works for their owner (Contains object).
Extend ccException to also check sym.owner, so members of CC-exempted
definitions are automatically exempted.
@anatoliykmetyuk anatoliykmetyuk marked this pull request as ready for review April 3, 2026 00:27
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.

1 participant