scala / bug

Scala 2 bug reports only. Please, no questions — proper bug reports only.
https://scala-lang.org
232 stars 21 forks source link

Compiler crash when Array[String] provided, but Array[Any] expected #2422

Closed scabug closed 13 years ago

scabug commented 15 years ago

Welcome to Scala version 2.8.0.r18844-b20091001021053 (Java HotSpot(TM) Client VM, Java 1.7.0-ea). Type in expressions to have them evaluated. Type :help for more information.

scala> val args = ArrayString args: Array[String] = Array(World)

scala> "Hello %1$$s".format(args: _*)

Press enter on the last line above, and the REPL closes with an exception concerning an expectation of an Array[Any] not an Array[String].

This code will also kill scalac within the ant task, and within the Eclipse Scala plugin.

scabug commented 15 years ago

Imported From: https://issues.scala-lang.org/browse/SI-2422?orig=1 Reporter: Paul LaCrosse (pjlacrosse)

scabug commented 15 years ago

Paul LaCrosse (pjlacrosse) said: Also occurs using JDK 1.6.0_16 (on Windows XP)

scabug commented 15 years ago

Paul LaCrosse (pjlacrosse) said: Since I've seen several array-related tickets closed, I tried it with the current nightly:

2.8.0.r19070-b20091013021844 (Java HotSpot(TM) Client VM, Java 1.7.0-ea) (build 73 of JDK).

No change - still blows up.

scabug commented 15 years ago

@odersky said: Fixed in r19074