diff options
author | Paul Phillips <paulp@improving.org> | 2013-03-05 07:42:49 -0800 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2013-03-05 07:42:49 -0800 |
commit | 2dd1a2b8f0e9c46bb600720a9b3fc20f275623a5 (patch) | |
tree | a38e8912d4e82e937054c7701f32c114c20cdfc9 | |
parent | 1d4cbc0cbe4f4df819136bafc84b65d5e3c925ea (diff) | |
parent | 3b071358a99ea3f90fb08a5a6b0b36c608b06931 (diff) | |
download | scala-2dd1a2b8f0e9c46bb600720a9b3fc20f275623a5.tar.gz scala-2dd1a2b8f0e9c46bb600720a9b3fc20f275623a5.tar.bz2 scala-2dd1a2b8f0e9c46bb600720a9b3fc20f275623a5.zip |
Merge pull request #2187 from JamesIry/master_SI-6816
SI-6816 Deprecate -Yeta-expand-keeps-star
4 files changed, 15 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/settings/ScalaSettings.scala b/src/compiler/scala/tools/nsc/settings/ScalaSettings.scala index a5496f829d..2c9c20666d 100644 --- a/src/compiler/scala/tools/nsc/settings/ScalaSettings.scala +++ b/src/compiler/scala/tools/nsc/settings/ScalaSettings.scala @@ -167,7 +167,8 @@ trait ScalaSettings extends AbsScalaSettings val Yreploutdir = StringSetting ("-Yrepl-outdir", "path", "Write repl-generated classfiles to given output directory (use \"\" to generate a temporary dir)" , "") val Ynotnull = BooleanSetting ("-Ynotnull", "Enable (experimental and incomplete) scala.NotNull.") val YmethodInfer = BooleanSetting ("-Yinfer-argument-types", "Infer types for arguments of overriden methods.") - val etaExpandKeepsStar = BooleanSetting ("-Yeta-expand-keeps-star", "Eta-expand varargs methods to T* rather than Seq[T]. This is a temporary option to ease transition.") + val etaExpandKeepsStar = BooleanSetting ("-Yeta-expand-keeps-star", "Eta-expand varargs methods to T* rather than Seq[T]. This is a temporary option to ease transition."). + withDeprecationMessage("This flag is scheduled for removal in 2.12. If you have a case where you need this flag then please report a bug.") val Yinvalidate = StringSetting ("-Yinvalidate", "classpath-entry", "Invalidate classpath entry before run", "") val noSelfCheck = BooleanSetting ("-Yno-self-type-checks", "Suppress check for self-type conformance among inherited members.") val YvirtClasses = false // too embryonic to even expose as a -Y //BooleanSetting ("-Yvirtual-classes", "Support virtual classes") diff --git a/test/files/neg/eta-expand-star-deprecation.check b/test/files/neg/eta-expand-star-deprecation.check new file mode 100644 index 0000000000..a79f0df76c --- /dev/null +++ b/test/files/neg/eta-expand-star-deprecation.check @@ -0,0 +1,4 @@ +warning: -Yeta-expand-keeps-star is deprecated: This flag is scheduled for removal in 2.12. If you have a case where you need this flag then please report a bug. +error: No warnings can be incurred under -Xfatal-warnings. +one warning found +one error found diff --git a/test/files/neg/eta-expand-star-deprecation.flags b/test/files/neg/eta-expand-star-deprecation.flags new file mode 100644 index 0000000000..5ac8b638e4 --- /dev/null +++ b/test/files/neg/eta-expand-star-deprecation.flags @@ -0,0 +1 @@ +-Yeta-expand-keeps-star -deprecation -Xfatal-warnings diff --git a/test/files/neg/eta-expand-star-deprecation.scala b/test/files/neg/eta-expand-star-deprecation.scala new file mode 100644 index 0000000000..5749692522 --- /dev/null +++ b/test/files/neg/eta-expand-star-deprecation.scala @@ -0,0 +1,8 @@ +object Test { + def f[T](xs: T*): Unit = () + def g[T] = f[T] _ + + def main(args: Array[String]): Unit = { + g(1, 2) + } +} |