New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Seq/Array varargs crash #4024
Comments
Imported From: https://issues.scala-lang.org/browse/SI-4024?orig=1 |
@paulp said: scala> res0.invoke(x, Seq(): _*)
exception when traversing line2$$object.$$iw.$$iw.res0.invoke(line0$$object.$$iw.$$iw.x, (collection.this.Seq.apply[Nothing](): _*))
exception when traversing private[this] val res1: java.lang.Object = line2$$object.$$iw.$$iw.res0.invoke(line0$$object.$$iw.$$iw.x, (collection.this.Seq.apply[Nothing](): _*))
...
Exception in thread "main" scala.tools.nsc.symtab.Types$$TypeError: type mismatch;
found : scala.reflect.Manifest[Nothing]
required: scala.reflect.ClassManifest[B]
at scala.tools.nsc.typechecker.Contexts$$Context.error(Contexts.scala:280)
at scala.tools.nsc.typechecker.Infer$$Inferencer.error(Infer.scala:203)
at scala.tools.nsc.typechecker.Infer$$Inferencer.typeError(Infer.scala:213)
at scala.tools.nsc.typechecker.Infer$$Inferencer.typeErrorTree(Infer.scala:228)
at scala.tools.nsc.typechecker.Typers$$Typer.adapt(Typers.scala:1018)
at scala.tools.nsc.typechecker.Typers$$Typer.typed(Typers.scala:4175)
at scala.tools.nsc.typechecker.Typers$$Typer.typedArg(Typers.scala:2189)
at scala.tools.nsc.typechecker.Typers$$Typer$$$$anonfun$$typedArgs$$3.apply(Typers.scala:2200)
at scala.tools.nsc.typechecker.Typers$$Typer$$$$anonfun$$typedArgs$$3.apply(Typers.scala:2199)
at scala.Tuple3$$Zipped$$$$anonfun$$map$$1.apply(Tuple3.scala:56)
at scala.Tuple3$$Zipped$$$$anonfun$$map$$1.apply(Tuple3.scala:54)
at scala.collection.LinearSeqOptimized$$class.foreach(LinearSeqOptimized.scala:61) |
@paulp said: Here is a test case with both crashers for the convenience of the eventual closer. object Test {
def main(args: Array[String]): Unit = {
val x = "abc"
val m = x.getClass.getMethod("toString")
m.invoke(x, Nil: _*)
m.invoke(x, Seq(): _*)
}
} |
@paulp said: |
The text was updated successfully, but these errors were encountered: