FIR: Fix incorrect inference errors for <expr>::class
Do not use outer expect type for <expr>
This commit is contained in:
committed by
teamcityserver
parent
3ec7866ead
commit
07440ee4a1
-16
@@ -1,16 +0,0 @@
|
||||
// FILE: J.java
|
||||
|
||||
public interface J {
|
||||
String platformString();
|
||||
}
|
||||
|
||||
// FILE: test.kt
|
||||
|
||||
fun f1(x: Int?): Any = <!EXPRESSION_OF_NULLABLE_TYPE_IN_CLASS_LITERAL_LHS!>x<!>::class
|
||||
fun <T> f2(t: T): Any = <!EXPRESSION_OF_NULLABLE_TYPE_IN_CLASS_LITERAL_LHS!>t<!>::class
|
||||
fun <T> f21(t: T): Any where T : Any?, T : Comparable<T> = t::class
|
||||
fun <S : String?> f3(s: S): Any = <!EXPRESSION_OF_NULLABLE_TYPE_IN_CLASS_LITERAL_LHS!>s<!>::class
|
||||
fun <U : Any> f4(u: U?): Any = <!EXPRESSION_OF_NULLABLE_TYPE_IN_CLASS_LITERAL_LHS!>u<!>::class
|
||||
fun f5(c: List<*>): Any = <!EXPRESSION_OF_NULLABLE_TYPE_IN_CLASS_LITERAL_LHS, TYPE_MISMATCH!>c[0]<!>::class
|
||||
|
||||
fun f6(j: J): Any = j.platformString()::class
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// FILE: J.java
|
||||
|
||||
public interface J {
|
||||
|
||||
Reference in New Issue
Block a user