Drop result of finally block after interpretation
This change is needed due to using FIR as frontend for tests. In this case finally block doesn't has coercion to unit so it's result must be dropped manually.
This commit is contained in:
committed by
TeamCityServer
parent
61d65436f4
commit
cc169613c1
+12
@@ -0,0 +1,12 @@
|
||||
@CompileTimeCalculation fun getUnitImplicit(): Unit {}
|
||||
@CompileTimeCalculation fun getUnitExplicit(): Unit { return Unit }
|
||||
@CompileTimeCalculation fun getUnitImplicitFromExpression(): Unit { if (true) {} else Unit }
|
||||
@CompileTimeCalculation fun getUnitImplicitFromTry1(): Unit { try {} finally { 5 } }
|
||||
@CompileTimeCalculation fun getUnitImplicitFromTry2(): Unit { try {} finally { } }
|
||||
|
||||
const val unit1 = Unit.<!EVALUATED: `kotlin.Unit`!>toString()<!>
|
||||
const val unit2 = getUnitImplicit().<!EVALUATED: `kotlin.Unit`!>toString()<!>
|
||||
const val unit3 = getUnitExplicit().<!EVALUATED: `kotlin.Unit`!>toString()<!>
|
||||
const val unit4 = getUnitImplicitFromExpression().<!EVALUATED: `kotlin.Unit`!>toString()<!>
|
||||
const val unit5 = getUnitImplicitFromTry1().<!EVALUATED: `kotlin.Unit`!>toString()<!>
|
||||
const val unit6 = getUnitImplicitFromTry2().<!EVALUATED: `kotlin.Unit`!>toString()<!>
|
||||
Reference in New Issue
Block a user