summaryrefslogtreecommitdiff
path: root/test/files/pos/no-widen-locals.scala
Commit message (Collapse)AuthorAgeFilesLines
* Modification to the widening logic to treat loc...Paul Phillips2010-10-141-0/+17
Modification to the widening logic to treat locally defined symbols like final members thus allowing more constants to be inlined. Concretely, that means that in code like this: def f: Unit = { val b = false ; if (b) println("ok") } The call to println is no longer generated at all, and in this code: def f(x: Int) = { val X = 1 ; val Y = 2; x match { case X => 1 ; case Y => 2 } } A tableswitch is generated instead of the present if/then/else. I also added a big comment to the former widenIfNotFinal (now widenIfNecessary for obvious reasons.) Review by rytz.