Skip to content

Compatibility with -Xfuture in type checking patmat #3200

Closed
@liufengyun

Description

@liufengyun

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions