summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
diff options
context:
space:
mode:
authorSom Snytt <som.snytt@gmail.com>2016-09-14 23:55:16 -0700
committerSom Snytt <som.snytt@gmail.com>2017-03-11 23:38:08 -0800
commitf672aff3f3b92506741b62d8f7eae6d1e0dc36a7 (patch)
tree7bfacf173c601643e83a91bb5eb53fce9e0caf5e /src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
parent9d9abffc94b28785e54bc2179b495d81f29b1e7f (diff)
downloadscala-f672aff3f3b92506741b62d8f7eae6d1e0dc36a7.tar.gz
scala-f672aff3f3b92506741b62d8f7eae6d1e0dc36a7.tar.bz2
scala-f672aff3f3b92506741b62d8f7eae6d1e0dc36a7.zip
SI-8040 Warn unused pattern vars
Warn for unused `case X(x) =>` but, as an escape hatch, not for `case X(x @ _) =>`. The latter form is deemed documentary. (Named args could serve a similar purpose, `case X(x = _) =>`.) An attachment is used to mark the bound var, and the symbol position is used to correlate the identifier with the variable that is introduced. This mechanism doesn't work yet when only a single var is defined.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/RefChecks.scala')
0 files changed, 0 insertions, 0 deletions