Skip to content

False "No class, trait or object is defined in the compilation unit." warning when using deferred given #23049

Open
@eejbyfeldt

Description

@eejbyfeldt

Compiler version

3.6.4

Minimized code

Compiled with the flag -Yforce-sbt-phases

trait TC[X]
object TC {
  given [X: scala.deriving.Mirror.ProductOf]: TC[X] = ???
}

trait Base[T] {
  given TC[T] = scala.compiletime.deferred
}

case class P()
object A extends Base[P]

Output

No class, trait or object is defined in the compilation unit.
The incremental compiler cannot record the dependency information in such case.
Some errors like unused import referring to a non-existent class might not be reported.

1 warning found

Expectation

The code should compile without warnings.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions