[FIR JS] Report rtti-related diagnostics
This commit is contained in:
-5
@@ -1,5 +0,0 @@
|
||||
external interface I
|
||||
|
||||
fun box(a: Any, b: Any): Pair<I, I?> {
|
||||
return Pair(a as I, b as? I)
|
||||
}
|
||||
+3
@@ -1,3 +1,6 @@
|
||||
// FIR_IDENTICAL
|
||||
// DIAGNOSTICS: +UNCHECKED_CAST_TO_EXTERNAL_INTERFACE
|
||||
|
||||
external interface I
|
||||
|
||||
fun box(a: Any, b: Any): Pair<I, I?> {
|
||||
|
||||
-5
@@ -1,5 +0,0 @@
|
||||
external interface I
|
||||
|
||||
fun box(a: Any, b: Any): Boolean {
|
||||
return a is I && b !is I
|
||||
}
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
external interface I
|
||||
|
||||
fun box(a: Any, b: Any): Boolean {
|
||||
|
||||
Vendored
-5
@@ -1,5 +0,0 @@
|
||||
external interface I
|
||||
|
||||
fun box() {
|
||||
println(I::class)
|
||||
}
|
||||
+3
@@ -1,5 +1,8 @@
|
||||
// FIR_IDENTICAL
|
||||
external interface I
|
||||
|
||||
typealias TA = I
|
||||
fun box() {
|
||||
println(<!EXTERNAL_INTERFACE_AS_CLASS_LITERAL!>I::class<!>)
|
||||
println(<!EXTERNAL_INTERFACE_AS_CLASS_LITERAL!>TA::class<!>)
|
||||
}
|
||||
Vendored
+2
@@ -7,3 +7,5 @@ public external interface I {
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
public typealias TA = I
|
||||
|
||||
|
||||
-9
@@ -1,9 +0,0 @@
|
||||
external interface I
|
||||
|
||||
external interface J
|
||||
|
||||
fun box(a: Any) = when (a) {
|
||||
is I -> 0
|
||||
!is J -> 1
|
||||
else -> 2
|
||||
}
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
external interface I
|
||||
|
||||
external interface J
|
||||
|
||||
Reference in New Issue
Block a user