[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:
+2
-2
@@ -22,9 +22,9 @@ class D {
|
||||
|
||||
fun main() {
|
||||
val x1: String.() -> String = if (true) {
|
||||
{ <!NO_THIS!>this<!> }
|
||||
{ this }
|
||||
} else {
|
||||
{ <!NO_THIS!>this<!> }
|
||||
{ this }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -47,14 +47,14 @@ FILE: instanceAccessBeforeSuperCall.kt
|
||||
public final fun main(): R|kotlin/Unit| {
|
||||
lval x1: R|kotlin/String.() -> kotlin/String| = when () {
|
||||
Boolean(true) -> {
|
||||
fun <anonymous>(it: R|kotlin/String|): R|ERROR CLASS: 'this' is not defined in this context| {
|
||||
^ this#
|
||||
fun R|kotlin/String|.<anonymous>(): R|kotlin/String| {
|
||||
^ this@R|special/anonymous|
|
||||
}
|
||||
|
||||
}
|
||||
else -> {
|
||||
fun <anonymous>(it: R|kotlin/String|): R|ERROR CLASS: 'this' is not defined in this context| {
|
||||
^ this#
|
||||
fun R|kotlin/String|.<anonymous>(): R|kotlin/String| {
|
||||
^ this@R|special/anonymous|
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user