Fix for KT-15726: Kotlin can't compile nested try-catch with return

#KT-15726 Fixed
This commit is contained in:
Mikhael Bogdanov
2017-01-26 16:33:08 +01:00
parent 2c1c3d1f31
commit ab464ea86e
7 changed files with 58 additions and 0 deletions
@@ -16,6 +16,7 @@
package org.jetbrains.kotlin.codegen.optimization
import org.jetbrains.kotlin.codegen.optimization.common.removeEmptyCatchBlocks
import org.jetbrains.kotlin.codegen.optimization.transformer.MethodTransformer
import org.jetbrains.org.objectweb.asm.Label
import org.jetbrains.org.objectweb.asm.tree.*
@@ -34,6 +35,7 @@ class LabelNormalizationMethodTransformer : MethodTransformer() {
rewriteNonLabelInstructions()
rewriteTryCatchBlocks()
rewriteLocalVars()
methodNode.removeEmptyCatchBlocks()
}
}