summaryrefslogtreecommitdiff
path: root/test/files/run/t6863.scala
Commit message (Collapse)AuthorAgeFilesLines
* SI-6863 Fix verify error in captured var inited from expr with try/catchJames Iry2013-01-251-0/+114
If a captured var was inited from a try/catch we did something reasonable. But if the var was inited from a more complicated expression (if/else, a block, match/case, etc) that ended with a try/catch then we didn't and we were generating faulty byte code. This fix patches LambdaLift to add the missing cases. For known simple expressions, the translation is just new *Ref(expr). For try/catch, if/else, match/case, and blocks this recursively walks down the internal result expressions to translate them. E.g. if(cond) trueExpr else falseExpr becomes if(cone) translate(trueExpr) else translate(falseExpr) For unknown expression types, the translation is {val temp = expr; new *Ref(expr) }