You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixes#23541
When supplying a default arg for an implicit application, warn if there
is an implicit value available.
That is for `f(using x = v)` where a default is supplied in `f(using x =
v, y = default)`. The user might think the implicit value is supplied,
which is not the case for explicit `using`; this is especially confusing
in a recursive call, where the user intends to "replace" an implicit
parameter.
Separately, behind a flag, warn if any recursive call uses a default arg
instead of passing the current parameter value.
`-Wrecurse-with-default`, `"Warn when a method calls itself with a
default argument."`
privatevalWimplausiblePatterns=BooleanSetting(WarningSetting, "Wimplausible-patterns", "Warn if comparison with a pattern value looks like it might always fail.")
168
168
privatevalWunstableInlineAccessors=BooleanSetting(WarningSetting, "WunstableInlineAccessors", "Warn an inline methods has references to non-stable binary APIs.")
169
169
privatevalWtoStringInterpolated=BooleanSetting(WarningSetting, "Wtostring-interpolated", "Warn a standard interpolator used toString on a reference type.")
170
+
privatevalWrecurseWithDefault=BooleanSetting(WarningSetting, "Wrecurse-with-default", "Warn when a method calls itself with a default argument.")
0 commit comments