You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With:
open class Root {}
class Subclass1: Root() {}
fun typeTests(x: Root, y: Subclass1) {
val y1: Subclass1 = if (x is Subclass1) { x } else { y }
}
we now get a slightly different AST, which means we no longer need to
insert a StmtExpr:
BRANCH
if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=<root>.Subclass1
GET_VAR 'x: <root>.Root declared in <root>.typeTests' type=<root>.Root origin=null
- then: TYPE_OP type=<root>.Subclass1 origin=IMPLICIT_CAST typeOperand=<root>.Subclass1
- BLOCK type=<root>.Root origin=null
+ then: BLOCK type=<root>.Subclass1 origin=null
+ TYPE_OP type=<root>.Subclass1 origin=IMPLICIT_CAST typeOperand=<root>.Subclass1
GET_VAR 'x: <root>.Root declared in <root>.typeTests' type=<root>.Root origin=null
0 commit comments