Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
allanrenucci opened this issue Dec 10, 2017 · 1 comment
Closed

Comments

@allanrenucci
Copy link
Contributor

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?

@smarter
Copy link
Member

smarter commented Dec 10, 2017

No, we shouldn't. This warns about a bug in scalac (scala/bug#4440) that does not exist in Dotty (#2156)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants