summaryrefslogtreecommitdiff
path: root/test/files/jvm/patmat_opt_no_nullcheck
Commit message (Collapse)AuthorAgeFilesLines
* SI-6686 drop valdef unused in flatMapCond's blockAdriaan Moors2013-01-311-1/+0
|
* no null check for type-tested unapply argAdriaan Moors2013-01-312-0/+33
pattern matching on case classes where pattern is not known to be a subclass of the unapply's argument type used to result in code like: ``` if (x1.isInstanceOf[Foo]) { val x2 = x1.asInstanceOf[Foo] if (x2 != null) { // redundant ... } } ``` this wastes byte code on the redundant null check with this patch, when previous type tests imply the variable cannot be null, there's no null check