Skip to content

Commit f0cf6f6

Browse files
Merge pull request #3729 from dotty-staging/fix-#3532
Fix #3532: Drop -Yinfer-argument-types
2 parents 22c0f91 + d46d986 commit f0cf6f6

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

compiler/src/dotty/tools/dotc/config/ScalaSettings.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ class ScalaSettings extends Settings.SettingGroup {
9090
val Ydumpclasses = StringSetting("-Ydump-classes", "dir", "Dump the generated bytecode to .class files (useful for reflective compilation that utilizes in-memory classloaders).", "")
9191
val YstopAfter = PhasesSetting("-Ystop-after", "Stop after") withAbbreviation ("-stop") // backward compat
9292
val YstopBefore = PhasesSetting("-Ystop-before", "Stop before") // stop before erasure as long as we have not debugged it fully
93-
val YmethodInfer = BooleanSetting("-Yinfer-argument-types", "Infer types for arguments of overriden methods.")
9493
val YtraceContextCreation = BooleanSetting("-Ytrace-context-creation", "Store stack trace of context creations.")
9594
val YshowSuppressedErrors = BooleanSetting("-Yshow-suppressed-errors", "Also show follow-on errors and warnings that are normally supressed.")
9695
val YdetailedStats = BooleanSetting("-Ydetailed-stats", "show detailed internal compiler stats (needs Stats.enabled to be set to true).")

compiler/src/dotty/tools/dotc/parsing/Parsers.scala

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1914,15 +1914,10 @@ object Parsers {
19141914
}
19151915
atPos(start, nameStart) {
19161916
val name = ident()
1917-
val tpt =
1918-
if (ctx.settings.YmethodInfer.value && owner.isTermName && in.token != COLON) {
1919-
TypeTree() // XX-METHOD-INFER
1920-
} else {
1921-
accept(COLON)
1922-
if (in.token == ARROW && owner.isTypeName && !(mods is Local))
1923-
syntaxError(VarValParametersMayNotBeCallByName(name, mods is Mutable))
1924-
paramType()
1925-
}
1917+
accept(COLON)
1918+
if (in.token == ARROW && owner.isTypeName && !(mods is Local))
1919+
syntaxError(VarValParametersMayNotBeCallByName(name, mods is Mutable))
1920+
val tpt = paramType()
19261921
val default =
19271922
if (in.token == EQUALS) { in.nextToken(); expr() }
19281923
else EmptyTree

0 commit comments

Comments
 (0)