Introduce FIR_IDENTICAL for FIR vs old frontend tests #KT-36879 Fixed
This commit is contained in:
Vendored
-18
@@ -1,18 +0,0 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
package a
|
||||
|
||||
import b.B.*
|
||||
import kotlin.reflect.KClass
|
||||
|
||||
class Companion
|
||||
|
||||
val f: KClass<a.Companion> = Companion::class
|
||||
|
||||
// FILE: 2.kt
|
||||
|
||||
package b
|
||||
|
||||
class B {
|
||||
companion object Companion
|
||||
}
|
||||
Vendored
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// FILE: 1.kt
|
||||
|
||||
package a
|
||||
|
||||
Vendored
-19
@@ -1,19 +0,0 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
package a
|
||||
|
||||
import b.*
|
||||
import kotlin.reflect.KClass
|
||||
|
||||
class A
|
||||
object B
|
||||
|
||||
val f: KClass<a.A> = A::class
|
||||
val g: KClass<a.B> = B::class
|
||||
|
||||
// FILE: 2.kt
|
||||
|
||||
package b
|
||||
|
||||
object A
|
||||
object B
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// FILE: 1.kt
|
||||
|
||||
package a
|
||||
|
||||
-14
@@ -1,14 +0,0 @@
|
||||
// !DIAGNOSTICS: -UNUSED_VARIABLE
|
||||
|
||||
import kotlin.reflect.KClass
|
||||
|
||||
fun test(s: String) {
|
||||
val f: () -> Int = s::hashCode
|
||||
val g: () -> String = s::toString
|
||||
val h: (Any?) -> Boolean = s::equals
|
||||
|
||||
val k: KClass<out String> = s::class
|
||||
val l: KClass<*> = s::class
|
||||
val m: KClass<String> = String::class
|
||||
val n: KClass<Unit> = Unit::class
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !DIAGNOSTICS: -UNUSED_VARIABLE
|
||||
|
||||
import kotlin.reflect.KClass
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
// !CHECK_TYPE
|
||||
|
||||
object Obj {
|
||||
fun foo() {}
|
||||
val bar = 2
|
||||
}
|
||||
|
||||
fun test() {
|
||||
checkSubtype<() -> Unit>(Obj::foo)
|
||||
checkSubtype<() -> Int>(Obj::bar)
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !CHECK_TYPE
|
||||
|
||||
object Obj {
|
||||
|
||||
-13
@@ -1,13 +0,0 @@
|
||||
// FILE: A.java
|
||||
|
||||
class A {
|
||||
public CharSequence getFoo() { return null; }
|
||||
}
|
||||
|
||||
// FILE: test.kt
|
||||
|
||||
fun test() {
|
||||
with (A()) {
|
||||
foo::toString
|
||||
}
|
||||
}
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// FILE: A.java
|
||||
|
||||
class A {
|
||||
|
||||
Vendored
-3
@@ -1,3 +0,0 @@
|
||||
fun <T: Any> get(t: T): () -> String {
|
||||
return t::toString
|
||||
}
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
fun <T: Any> get(t: T): () -> String {
|
||||
return t::toString
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user