[FIR] Fix copy paste error in receiver enhancement

This commit is contained in:
Kirill Rakhman
2024-02-27 13:18:47 +01:00
committed by Space Team
parent 8a90032e93
commit 29a9d3cdd9
7 changed files with 54 additions and 1 deletions
@@ -0,0 +1,23 @@
// FIR_IDENTICAL
// FILE: J.java
public class J extends Foo {
@Override
public <T> T bar(String $this$bar) {
super.bar($this$bar);
}
}
// FILE: test.kt
open class Foo {
fun <T> String.bar(): T {
@Suppress("UNCHECKED_CAST")
return null as T
}
}
fun J.test(s1: String?, s2: String) {
s1<!UNSAFE_CALL!>.<!>bar<Int>()
s1?.bar<Int>()
s2.bar<Int>()
s2<!UNNECESSARY_SAFE_CALL!>?.<!>bar<Int>()
}