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 /src/compiler/scala/tools/nsc/Global.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 'src/compiler/scala/tools/nsc/Global.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/Global.scala | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/Global.scala b/src/compiler/scala/tools/nsc/Global.scala index 604379d33f..e166b42436 100644 --- a/src/compiler/scala/tools/nsc/Global.scala +++ b/src/compiler/scala/tools/nsc/Global.scala @@ -300,6 +300,12 @@ class Global(var currentSettings: Settings, var reporter: Reporter) extends Symb def lubDebug = (sys.props contains "scalac.debug.lub") } + // The current division between scala.reflect.* and scala.tools.nsc.* is pretty + // clunky. It is often difficult to have a setting influence something without having + // to create it on that side. For this one my strategy is a constant def at the file + // where I need it, and then an override in Global with the setting. + override protected val etaExpandKeepsStar = settings.etaExpandKeepsStar.value + // True if -Xscript has been set, indicating a script run. def isScriptRun = opt.script.isDefined |