We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The following REPL session illustrates the problem:
scala> object o { def apply(i: AnyRef*)(j: String) = i } defined module o scala> o()("") res1: Seq[AnyRef] = List() // RIGHT scala> (o()_)("") res2: Seq[AnyRef] = WrappedArray(null) // WRONG
The problem doesn't show up with 2.10.0-M3.
The text was updated successfully, but these errors were encountered:
Imported From: https://issues.scala-lang.org/browse/SI-5966?orig=1 Reporter: Juan Manuel Serrano (jserrano) Affected Versions: 2.10.0-M4 Other Milestones: 2.10.0
Sorry, something went wrong.
@retronym said: Here's a candidate fix, but I'd like to know why this suddenly appeared.
https://github.com/retronym/scala/compare/ticket/5966
@magarciaEPFL said: The behavior in question results in 2.10-M4 from a lowering in uncurry, as shown below (before and after) for the snippets:
uncurry
def exprA = o()("") def exprB = (o()_)("")
// after_Typer.scala def exprA: Seq[AnyRef] = o.apply()(""); def exprB: Seq[AnyRef] = { ((j: String) => o.apply(<empty>)(j)) }.apply("")
// after_Uncurry.scala def exprA(): Seq[Object] = o.apply(immutable.this.Nil, ""); def exprB(): Seq[Object] = { { @SerialVersionUID(0) final <synthetic> class $anonfun extends scala.runtime.AbstractFunction1[String,Seq[Object]] with Serializable { def <init>(): anonymous class $anonfun = { $anonfun.super.<init>(); () }; final def apply(j: String): Seq[Object] = o.apply(scala.this.Predef.wrapRefArray[Object](Array[Object]{<empty>}), j) }; (new anonymous class $anonfun(): String => Seq[Object]) } }.apply("")
@retronym said: scala/scala#760
retronym
No branches or pull requests
The following REPL session illustrates the problem:
The problem doesn't show up with 2.10.0-M3.
The text was updated successfully, but these errors were encountered: