Continue processing not builder inference stub variables in the type checker during computing common super type
^KT-47148 Fixed
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
interface Visitor<T> {
|
||||
fun visit(key: String): T
|
||||
}
|
||||
val str1: String? = null
|
||||
val str2: String? = null
|
||||
fun <T> visit(arg: Visitor<T>): T = str1?.let { return@visit arg.visit(it) }
|
||||
?: str2?.let { return@visit arg.visit(it) }
|
||||
?: error("error")
|
||||
@@ -0,0 +1,10 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
interface Visitor<T> {
|
||||
fun visit(key: String): T
|
||||
}
|
||||
val str1: String? = null
|
||||
val str2: String? = null
|
||||
fun <T> visit(arg: Visitor<T>): T = str1?.<!IMPLICIT_NOTHING_TYPE_ARGUMENT_AGAINST_NOT_NOTHING_EXPECTED_TYPE!>let<!> { return@visit arg.visit(it) }
|
||||
?: str2?.<!IMPLICIT_NOTHING_TYPE_ARGUMENT_AGAINST_NOT_NOTHING_EXPECTED_TYPE!>let<!> { return@visit arg.visit(it) }
|
||||
?: error("error")
|
||||
@@ -0,0 +1,12 @@
|
||||
package
|
||||
|
||||
public val str1: kotlin.String? = null
|
||||
public val str2: kotlin.String? = null
|
||||
public fun </*0*/ T> visit(/*0*/ arg: Visitor<T>): T
|
||||
|
||||
public interface Visitor</*0*/ T> {
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
public abstract fun visit(/*0*/ key: kotlin.String): T
|
||||
}
|
||||
Reference in New Issue
Block a user