Skip to content

Crash on sequence-match if Product is inherited and intermediary _X is not defined #19220

Closed
@SrTobi

Description

@SrTobi

Compiler version

3.3.1

Minimized code

object Test:
  class Custom extends scala.Product1[String]:
    def length: Int = ???
    def apply(i: Int): Boolean = ???
    def drop(n: Int): scala.Seq[Boolean] = ???
    def toSeq: scala.Seq[Boolean] = ???

    def canEqual(that: Any): Boolean = ???

    val _1: String = ???
    val _3: Seq[String] = ???

  class Unapplied:
    def isEmpty: Boolean = ???
    def get: Custom = ???

  object A:
    def unapplySeq(i: Int): Unapplied = ???

  val A(a, rest*) = 1

Output (click arrow to expand)

scala: undefined: x9.<none> # -1: TermRef(TermRef(NoPrefix,val x9),<none>) at preRecheck

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions