JVM IR: Remove type substitutions from ExpressionCodegen

Instead, determine whether the return type of a call is Nothing, by
looking at the type of the call expression.
This commit is contained in:
Steven Schäfer
2020-01-22 11:38:20 +01:00
committed by max-kammerer
parent 2f0f4e570f
commit aea5e3ffbc
8 changed files with 3 additions and 12 deletions
-1
View File
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
open class A<T> {
open fun f(args : Array<T>) {}
}
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
public abstract class AbstractClass<T> {
public abstract val some: T
}
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
interface PsiElement {
fun <T: PsiElement> findChildByType(i: Int): T? =
if (i == 42) JetOperationReferenceExpression() as T else throw Exception()
@@ -1,6 +1,4 @@
// IGNORE_BACKEND_FIR: JVM_IR
// IGNORE_BACKEND: JVM_IR
// For JVM_IR, NewInference is needed because of KT-26531. See functionExpressionWithThisReferenceNI.kt
fun Int.thisRef1() = fun () = this
fun Int.thisRef2() = fun (): Int {return this}
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// TARGET_BACKEND: JVM
interface I {
fun <T : String> f(x: T?) = x ?: "OK"
@@ -1,5 +1,4 @@
// !LANGUAGE: +NewInference
// IGNORE_BACKEND_FIR: JVM_IR
class Recursive<T : Recursive<T>> : Generic<PlaceHolder<T>>, MainSupertype
open class Simple<T> : Generic<T>, MainSupertype
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
open class Bar<T>(val prop: String)
object Foo : Bar<Foo>("OK") {