scala/scala — pull request #982 by adriaanm (2012-07-24 12:39:31+00:00)
Title: SI-5930 SI-5897 reduce redundant warnings in matches, fix flags usage

* SI-5930 don't warn about dead code in jump to case
the jump to matchEnd with a throw new MatchError in the argument position caused spurious dead code warnings, so ignoring those

(yes, the jump is dead code, but this is how it has to be)

* SI-5897 don't check sensicality in match
the pattern matcher analyses (unreachability/exhaustivity) should cover more than the sensical comparison analysis, so skipping the latter in matches

* the fix for SI-5930 required factoring out some flag checking code, so moved the magic flag combo to treeInfo
should go to Flags, I feel, but opinions on dealing with composite flags differ
as a compromise I kept the hasAllFlags check and the definition of the flag combo val together

review of the compromise and fixes by @paulp (similar treatment for GADT_SKOLEM to follow)