FIR2IR: standardize expression with smart cast conversion

To convert smart cast expression, now we just convert
original expression in standard way and wrap it with TYPE_OP.
Before this commit original expression was converted in different way,
that led to errors e.g. for this expression casting.
This commit is contained in:
Mikhail Glukhikh
2020-02-25 12:12:48 +03:00
parent d1fac6dce1
commit 522eeae062
12 changed files with 9 additions and 13 deletions
-1
View File
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// TARGET_BACKEND: JVM
// JVM_TARGET: 1.8
-1
View File
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
abstract class C {
fun test(x: Int) {
if (x == 0) return
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
open class SuperFoo {
public fun bar(): String {
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
open class A {
class B : A() {
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
open class A {
fun f(): String =
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
open class A {
open fun foo() = "FAIL"
-1
View File
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
open class Test1 {
fun test1(): String {
if (this is Test2) {
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
package h
open class A {