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
Lint function arrow intended context function (scala#23847)
Fixesscala#21187
If a function literal `x => body` has an expected type `X ?=> ?` then
maybe they intended to write `x ?=> body`.
As shown in the test, maybe types will misalign in other ways to emit
warnings.
privatevalWenumCommentDiscard=BooleanSetting("-Wenum-comment-discard", "Warn when a comment ambiguously assigned to multiple enum cases is discarded.")
177
177
privatevalWtoStringInterpolated=BooleanSetting("-Wtostring-interpolated", "Warn a standard interpolator used toString on a reference type.")
178
178
privatevalWrecurseWithDefault=BooleanSetting("-Wrecurse-with-default", "Warn when a method calls itself with a default argument.")
179
+
privatevalWwrongArrow=BooleanSetting("-Wwrong-arrow", "Warn if function arrow was used instead of context literal ?=>.")
0 commit comments