diff options
author | Paul Phillips <paulp@improving.org> | 2011-10-09 19:24:48 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-10-09 19:24:48 +0000 |
commit | bc4468cdd266fc12fe164c1b6ec4da94b71a4129 (patch) | |
tree | 4daa2b1a82c17daf9c2f901de953d2fa82ddebe4 /test/files/run/eta-expand-star2.scala | |
parent | 2c1a1192ce19f84984eb52037fba5b26794ed3fa (diff) | |
download | scala-bc4468cdd266fc12fe164c1b6ec4da94b71a4129.tar.gz scala-bc4468cdd266fc12fe164c1b6ec4da94b71a4129.tar.bz2 scala-bc4468cdd266fc12fe164c1b6ec4da94b71a4129.zip |
Flipped varargs eta-expansion behavior.
(T*)U now eta-expands to Seq[T] => U, not T* => U. There is a transition
command line switch to get the old behavior for any who may have relied
upon it:
-Yeta-expand-keeps-star
Closes SI-4176, no review.
Diffstat (limited to 'test/files/run/eta-expand-star2.scala')
-rw-r--r-- | test/files/run/eta-expand-star2.scala | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/files/run/eta-expand-star2.scala b/test/files/run/eta-expand-star2.scala new file mode 100644 index 0000000000..eb650788d0 --- /dev/null +++ b/test/files/run/eta-expand-star2.scala @@ -0,0 +1,8 @@ +object Test { + def f[T](xs: T*): T = xs.head + def g[T] = f[T] _ + + def main(args: Array[String]): Unit = { + println(g("hello")) + } +} |