[FIR] Properly pass type attributes for inference of lambda with type variable as expected type
#KT-41989 Fixed #KT-37317 Fixed
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
// ISSUE: KT-41989
|
||||
|
||||
interface A
|
||||
|
||||
interface B {
|
||||
fun A.withBottomBorder(): A = this
|
||||
}
|
||||
|
||||
interface C : B {
|
||||
val lineCellStyle: (A.() -> Unit)?
|
||||
get() = if (cond()) {
|
||||
{
|
||||
withBottomBorder()
|
||||
}
|
||||
} else null
|
||||
}
|
||||
|
||||
fun cond(): Boolean = true
|
||||
@@ -0,0 +1,30 @@
|
||||
FILE: kt41989.kt
|
||||
public abstract interface A : R|kotlin/Any| {
|
||||
}
|
||||
public abstract interface B : R|kotlin/Any| {
|
||||
public open fun R|A|.withBottomBorder(): R|A| {
|
||||
^withBottomBorder this@R|/B.withBottomBorder|
|
||||
}
|
||||
|
||||
}
|
||||
public abstract interface C : R|B| {
|
||||
public open val lineCellStyle: R|A.() -> kotlin/Unit|
|
||||
public get(): R|A.() -> kotlin/Unit| {
|
||||
^ when () {
|
||||
R|/cond|() -> {
|
||||
fun R|A|.<anonymous>(): R|kotlin/Unit| {
|
||||
(this@R|/C|, this@R|special/anonymous|).R|/B.withBottomBorder|()
|
||||
}
|
||||
|
||||
}
|
||||
else -> {
|
||||
Null(null)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
public final fun cond(): R|kotlin/Boolean| {
|
||||
^cond Boolean(true)
|
||||
}
|
||||
Reference in New Issue
Block a user