Skip to content

The outer reference in this type test cannot be checked at run time. #3652

@allanrenucci

Description

@allanrenucci
class Test {
  final case class Foo(x: Int)
}

When compiled with scalac a warning is emitted:

$ scalac -d out tests/allan/Test.scala -unchecked
tests/allan/Test.scala:2: warning: The outer reference in this type test cannot be checked at run time.
  final case class Foo(x: Int)

The warning is only emitted if the class is final. Dotty does not emit a warning. Is the warning legitimate? Should we also emit a warning?

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