1

Scala tuple unpacking cannot resolve argument name which start with a upper character. This is a bug?

val myTuple = (1,2,3)
val (aRG1, aRG2, aRG3) = myTuple // start with lower character, this works
val (ARG1, ARG2, ARG3) = myTuple // error: not found: value ARG1

My environment is Scala 2.11.8 on Java 1.8. You can run this on online REPL with Scala 2.12, and this error also occurs.

https://scastie.scala-lang.org/YDiNXuw6QFCYwuJDOkjWlg

enter image description here

zhengchl
  • 341
  • 3
  • 7

0 Answers0