Skip to content

Incorrect inline match for three elements #23776

@Kright

Description

@Kright

Compiler version

Bug exists in 3.3.6 LTS
Not exists in 3.7.2

Minimized code

inline def f(t0: Int, t1: Int, t2: Int) = {
  inline (t0, t1, t2) match {
    case (a: Int, b: Int, c: Int) => println(s"a = $a, b = $b, c = $c")
  }
}

@main def test = f(0, 1, 2)

Same on scastie: https://scastie.scala-lang.org/7GBujdEDQS6VxxKGipykqA

Output

a = 0, b = 2, c = 2

Expectation

a = 0, b = 1, c = 2

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions