diff options
-rw-r--r-- | src/compiler/scala/tools/nsc/Settings.scala | 1 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/transform/Constructors.scala | 2 | ||||
-rw-r--r-- | test/files/run/checked.flags | 2 |
3 files changed, 3 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/Settings.scala b/src/compiler/scala/tools/nsc/Settings.scala index ab87b1228d..8477a94d1a 100644 --- a/src/compiler/scala/tools/nsc/Settings.scala +++ b/src/compiler/scala/tools/nsc/Settings.scala @@ -125,6 +125,7 @@ class Settings(error: String => Unit) { val showPhases = BooleanSetting ("-Xshow-phases", "Print a synopsis of compiler phases").hideToIDE val sourceReader = StringSetting ("-Xsource-reader", "classname", "Specify a custom method for reading source files", "scala.tools.nsc.io.SourceReader").hideToIDE // val migrate2_7_2 = BooleanSetting ("-Xmigrate-to-2.7.2", "Issue warning messages to help in migration to 2.7.2") + val future = BooleanSetting ("-Xfuture", "Turn on future language features") val Yhelp = BooleanSetting ("-Y", "Print a synopsis of private options").hideToIDE val browse = PhasesSetting ("-Ybrowse", "Browse the abstract syntax tree after") diff --git a/src/compiler/scala/tools/nsc/transform/Constructors.scala b/src/compiler/scala/tools/nsc/transform/Constructors.scala index 8753e83868..50be9600b2 100644 --- a/src/compiler/scala/tools/nsc/transform/Constructors.scala +++ b/src/compiler/scala/tools/nsc/transform/Constructors.scala @@ -114,7 +114,7 @@ abstract class Constructors extends Transform { g != NoSymbol && !g.allOverriddenSymbols.isEmpty }) unit.warning(tree.pos, "the semantics of this definition has changed;\nthe initialization is no longer be executed before the superclass is called") - (mods hasFlag PRESUPER | PARAMACCESSOR) || !thisRefSeen && !settings.Xexperimental.value + (mods hasFlag PRESUPER | PARAMACCESSOR) || !thisRefSeen && (!settings.future.value && !settings.checkInit.value) case _ => false } diff --git a/test/files/run/checked.flags b/test/files/run/checked.flags index f047aa2636..a66d19bdf5 100644 --- a/test/files/run/checked.flags +++ b/test/files/run/checked.flags @@ -1 +1 @@ --Xexperimental -Ycheckinit -nowarn +-Ycheckinit -nowarn |