Skip to content

Pattern Definitions are not aware of TupleXXL #7580

Closed
@bishabosha

Description

@bishabosha

In desugared pattern definitions, each def for val a1: Int = this.$1$._1... relies on the existence of _N members, even beyond 22 parameters.

minimized code

val List(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20, a21, a22, a23, _:_*) = List.fill(25)(0)

error

-- [E008] Member Not Found Error: ValPattern.scala:1:2 ------------------------
1  |  val List(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20, a21, a22, a23, _:_*) = List.fill(25)(0)
   |  ^
   |value _1 is not a member of (Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int
   |  , 
   |Int, Int, Int, Int, Int, Int, Int)

expectation

no type or runtime error

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions