Skip to content

Coverage misses generic given with "-language:strictEquality" and CanEqual.derived #20508

Open
@mohe2015

Description

@mohe2015

Compiler version

3.4.2 and 3.5.0-RC1, so probably all

Minimized code

With -language:strictEquality and coverage enabled (project available at https://github.com/mohe2015/scala3-broken-coverage-explicit-nulls/tree/coverage-canequal, note the non-default branch)

case class Test[T](value: T)

given canEqual[T]: CanEqual[Test[T], Test[T]] = CanEqual.derived

@main def hello(): Unit =
  print(Test(1) == Test(1))

Output

The given is not marked as covered.

image

Note: It is not marked red when replacing the generic T by some concrete type.

Expectation

The given should either be marked not at all or in green as covered.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:coverageCode coverage, see https://dotty.epfl.ch/docs/internals/coverage.htmlarea:strictEqualityscala.language.strictEqualityitype:bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions