scalacenter / scala

The Scala programming language

Home Page:http://www.scala-lang.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Handle SUPERtype reference

bishabosha opened this issue · comments

Compile with Dotty 0.22.x

object SuperTypes

  class Bar
    final val bar = "Bar.bar"

  class Foo extends Bar
    object A
      def unapply(a: Any): Some[Foo.super.bar.type] = ???

    def foo =
      "" match
        case A(x) => x // SUPERtype