Skip to content
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

Possibly spurious type test warning #8383

Closed
travisbrown opened this issue Feb 26, 2020 · 1 comment
Closed

Possibly spurious type test warning #8383

travisbrown opened this issue Feb 26, 2020 · 1 comment
Assignees

Comments

@travisbrown
Copy link
Contributor

minimized code

sealed trait Base[F[_]]
case class Foo[F[_]]() extends Base[F]
object Base

Compilation output

3 |object Base
  |       ^
  |       the type test for Foo[?] cannot be checked at runtime
// defined trait Base
// defined case class Foo
// defined object Base

expectation

Scala 2 doesn't warn here, and removing the object Base removes the warning on Dotty:

scala> sealed trait Base[F[_]]
     | case class Foo[F[_]]() extends Base[F]
// defined trait Base
// defined case class Foo
@smarter
Copy link
Member

smarter commented Jul 4, 2020

Fixed in 0.25 (see #9045).

@smarter smarter closed this as completed Jul 4, 2020
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