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
Seems -Ywarn-unused:params is just busted irrespective of plugin. E.g. it warns in this simple case:
objecttestextendsApp {
valx=for {
n <-Some(1)
if n >0
} yield"Sup"
println(x)
}
(scastie, but you might need to edit a code to trigger a recompile with full warnings), and if you do yield n, it's not reproducible on 0.3.1 with code you've provided.
@oleg-py, that expression has to be desugared into something like
Some(1).filter(n => n >0).map(n =>"Sup")
, which probably makes determining "whether n is used" difficult (since there is no single n). There areissues about this behavior, but they don't seem to going anywhere. And I see no good way to work around this in a plugin without changing semantics (by getting something more than filter and map to work with), or disabling this lint.
Looks like we'll just have to write it like this for the foreseeable future:
This code:
triggers the "unused parameter" lint:
The text was updated successfully, but these errors were encountered: