summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
diff options
context:
space:
mode:
authorSom Snytt <som.snytt@gmail.com>2016-09-15 12:58:21 -0700
committerSom Snytt <som.snytt@gmail.com>2017-03-11 23:38:08 -0800
commitbd280077d04a3ac84ca48f549faaa8915d46ef2e (patch)
treea7c8b244ef84b44df201c88b4233d17bcec306d1 /src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
parent1b415c904bece230a706c0d19462345fc87abf67 (diff)
downloadscala-bd280077d04a3ac84ca48f549faaa8915d46ef2e.tar.gz
scala-bd280077d04a3ac84ca48f549faaa8915d46ef2e.tar.bz2
scala-bd280077d04a3ac84ca48f549faaa8915d46ef2e.zip
SI-9158 No warn for comprehension patvars
Midstream assignments should not cause unused warnings. Currently the encoding doesn't pass them along, but passes the value from which they were destructured. For for-comprehensions only, the patvar transform tags the binds so that they are not warned if they turn up in a valdef and are unused. Extractors are invoked multiple times if the patvar is used later, as noted on the ticket. In a yield, the valdef is emitted only if the patvar is referenced (possibly saving the extra extraction), so there is no warning there currently.
Diffstat (limited to 'src/compiler/scala/tools/nsc/ast/parser/Parsers.scala')
0 files changed, 0 insertions, 0 deletions