diff --git a/compiler/src/dotty/tools/dotc/config/ScalaSettings.scala b/compiler/src/dotty/tools/dotc/config/ScalaSettings.scala index 49e65bbb0b1f..e7da58fd5644 100644 --- a/compiler/src/dotty/tools/dotc/config/ScalaSettings.scala +++ b/compiler/src/dotty/tools/dotc/config/ScalaSettings.scala @@ -90,7 +90,6 @@ class ScalaSettings extends Settings.SettingGroup { val Ydumpclasses = StringSetting("-Ydump-classes", "dir", "Dump the generated bytecode to .class files (useful for reflective compilation that utilizes in-memory classloaders).", "") val YstopAfter = PhasesSetting("-Ystop-after", "Stop after") withAbbreviation ("-stop") // backward compat val YstopBefore = PhasesSetting("-Ystop-before", "Stop before") // stop before erasure as long as we have not debugged it fully - val YmethodInfer = BooleanSetting("-Yinfer-argument-types", "Infer types for arguments of overriden methods.") val YtraceContextCreation = BooleanSetting("-Ytrace-context-creation", "Store stack trace of context creations.") val YshowSuppressedErrors = BooleanSetting("-Yshow-suppressed-errors", "Also show follow-on errors and warnings that are normally supressed.") val YdetailedStats = BooleanSetting("-Ydetailed-stats", "show detailed internal compiler stats (needs Stats.enabled to be set to true).") diff --git a/compiler/src/dotty/tools/dotc/parsing/Parsers.scala b/compiler/src/dotty/tools/dotc/parsing/Parsers.scala index 9e75ade74971..6adac05db82a 100644 --- a/compiler/src/dotty/tools/dotc/parsing/Parsers.scala +++ b/compiler/src/dotty/tools/dotc/parsing/Parsers.scala @@ -1914,15 +1914,10 @@ object Parsers { } atPos(start, nameStart) { val name = ident() - val tpt = - if (ctx.settings.YmethodInfer.value && owner.isTermName && in.token != COLON) { - TypeTree() // XX-METHOD-INFER - } else { - accept(COLON) - if (in.token == ARROW && owner.isTypeName && !(mods is Local)) - syntaxError(VarValParametersMayNotBeCallByName(name, mods is Mutable)) - paramType() - } + accept(COLON) + if (in.token == ARROW && owner.isTypeName && !(mods is Local)) + syntaxError(VarValParametersMayNotBeCallByName(name, mods is Mutable)) + val tpt = paramType() val default = if (in.token == EQUALS) { in.nextToken(); expr() } else EmptyTree