Skip to content

Compatibility with -Xfuture in type checking patmat #3200

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
liufengyun opened this issue Sep 27, 2017 · 0 comments
Closed

Compatibility with -Xfuture in type checking patmat #3200

liufengyun opened this issue Sep 27, 2017 · 0 comments

Comments

@liufengyun
Copy link
Contributor

The following code fails with scalac -Xfuture test.scala, but Dotty compiles without problem:

object Test {
  case object Bob { override def equals(other: Any) = true }
  def f(x: Any): Bob.type = x match { case x @ Bob => x }
}

This is a separate issue extracted from #1463.

@liufengyun liufengyun self-assigned this Feb 13, 2018
liufengyun added a commit that referenced this issue Mar 27, 2018
Fix #3200: bind var for singleton pattern get scrutinee type
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