Remove default import "kotlin.reflect"
Basic reflection is usable without any imports (with :: literals)
This reverts commit 9503056dd5.
This commit is contained in:
+2
@@ -1,3 +1,5 @@
|
||||
import kotlin.reflect.KFunction0
|
||||
|
||||
class A {
|
||||
fun main() {
|
||||
val x = ::A
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
import kotlin.reflect.KFunction0
|
||||
|
||||
class A
|
||||
class B
|
||||
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
import kotlin.reflect.KFunction0
|
||||
|
||||
class A
|
||||
|
||||
class B {
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
import kotlin.reflect.KFunction0
|
||||
|
||||
class A
|
||||
|
||||
fun main() {
|
||||
|
||||
+2
@@ -12,6 +12,8 @@ class A {
|
||||
|
||||
package other
|
||||
|
||||
import kotlin.reflect.*
|
||||
|
||||
import first.A
|
||||
|
||||
fun main() {
|
||||
|
||||
+2
@@ -12,6 +12,8 @@ fun A.baz() {}
|
||||
|
||||
package other
|
||||
|
||||
import kotlin.reflect.KExtensionFunction0
|
||||
|
||||
import first.A
|
||||
import first.foo
|
||||
|
||||
|
||||
+2
@@ -10,6 +10,8 @@ fun baz() = "OK"
|
||||
|
||||
package other
|
||||
|
||||
import kotlin.reflect.*
|
||||
|
||||
import first.foo
|
||||
import first.bar
|
||||
import first.baz
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
import kotlin.reflect.*
|
||||
|
||||
class A {
|
||||
fun main() {
|
||||
val x = ::foo
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
import kotlin.reflect.*
|
||||
|
||||
class A
|
||||
|
||||
fun A.main() {
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
import kotlin.reflect.*
|
||||
|
||||
class B
|
||||
|
||||
class A {
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
import kotlin.reflect.*
|
||||
|
||||
class A
|
||||
|
||||
fun A.foo() {}
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
import kotlin.reflect.*
|
||||
|
||||
class A {
|
||||
fun foo() {}
|
||||
}
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
import kotlin.reflect.KMemberFunction0
|
||||
|
||||
class A<T>(val t: T) {
|
||||
fun foo(): T = t
|
||||
}
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
import kotlin.reflect.KMemberFunction0
|
||||
|
||||
class A {
|
||||
inner class Inner
|
||||
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
import kotlin.reflect.KMemberFunction0
|
||||
|
||||
class A {
|
||||
inner class Inner
|
||||
}
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
import kotlin.reflect.KMemberFunction0
|
||||
|
||||
class A {
|
||||
inner class Inner
|
||||
}
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
import kotlin.reflect.KFunction0
|
||||
|
||||
fun main() {
|
||||
class A
|
||||
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
import kotlin.reflect.KFunction0
|
||||
|
||||
fun main() {
|
||||
class A
|
||||
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
import kotlin.reflect.KFunction0
|
||||
|
||||
fun main() {
|
||||
class A
|
||||
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
import kotlin.reflect.KFunction0
|
||||
|
||||
fun main() {
|
||||
class A
|
||||
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
import kotlin.reflect.*
|
||||
|
||||
fun main() {
|
||||
fun foo() {}
|
||||
fun bar(<!UNUSED_PARAMETER!>x<!>: Int) {}
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
import kotlin.reflect.*
|
||||
|
||||
class A
|
||||
|
||||
fun main() {
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
import kotlin.reflect.*
|
||||
|
||||
fun main() {
|
||||
fun foo() {}
|
||||
fun bar(<!UNUSED_PARAMETER!>x<!>: Int) {}
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
import kotlin.reflect.*
|
||||
|
||||
class A
|
||||
|
||||
fun main() {
|
||||
|
||||
+2
@@ -8,6 +8,8 @@ class D {
|
||||
|
||||
// FILE: b.kt
|
||||
|
||||
import kotlin.reflect.KMemberFunction0
|
||||
|
||||
fun main() {
|
||||
val x = a.b.c.D::foo
|
||||
|
||||
|
||||
+2
@@ -8,6 +8,8 @@ class D<E, F> {
|
||||
|
||||
// FILE: b.kt
|
||||
|
||||
import kotlin.reflect.KMemberFunction2
|
||||
|
||||
fun main() {
|
||||
val x = a.b.c.D<String, Int>::foo
|
||||
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
import kotlin.reflect.*
|
||||
|
||||
class A {
|
||||
fun foo() {}
|
||||
fun bar(<!UNUSED_PARAMETER!>x<!>: Int) {}
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
import kotlin.reflect.*
|
||||
|
||||
class A {
|
||||
fun foo() {}
|
||||
fun bar(<!UNUSED_PARAMETER!>x<!>: Int) {}
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
import kotlin.reflect.*
|
||||
|
||||
class A {
|
||||
fun foo() {}
|
||||
fun bar(<!UNUSED_PARAMETER!>x<!>: Int) {}
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
import kotlin.reflect.*
|
||||
|
||||
class A {
|
||||
fun foo() {}
|
||||
fun bar(<!UNUSED_PARAMETER!>x<!>: Int) {}
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
import kotlin.reflect.KFunction0
|
||||
|
||||
class A {
|
||||
class Nested
|
||||
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
import kotlin.reflect.KFunction0
|
||||
|
||||
class A {
|
||||
class Nested
|
||||
}
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
import kotlin.reflect.KFunction0
|
||||
|
||||
class A {
|
||||
class Nested
|
||||
}
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
import kotlin.reflect.KMemberFunction0
|
||||
|
||||
class A {
|
||||
fun foo() = 42
|
||||
}
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
import kotlin.reflect.KMemberFunction0
|
||||
|
||||
fun foo() {}
|
||||
|
||||
class A {
|
||||
|
||||
+2
@@ -12,6 +12,8 @@ fun A.baz(<!UNUSED_PARAMETER!>x<!>: String) {}
|
||||
|
||||
// FILE: b.kt
|
||||
|
||||
import kotlin.reflect.*
|
||||
|
||||
import other.foo as foofoo
|
||||
import other.A as AA
|
||||
import other.baz as bazbaz
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
import kotlin.reflect.*
|
||||
|
||||
fun foo() {}
|
||||
fun bar(<!UNUSED_PARAMETER!>x<!>: Int) {}
|
||||
fun baz() = "OK"
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
import kotlin.reflect.*
|
||||
|
||||
class A
|
||||
|
||||
fun foo() {}
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
import kotlin.reflect.*
|
||||
|
||||
class A
|
||||
|
||||
fun foo() {}
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
import kotlin.reflect.*
|
||||
|
||||
fun foo() {}
|
||||
fun bar(<!UNUSED_PARAMETER!>x<!>: Int) {}
|
||||
fun baz() = "OK"
|
||||
|
||||
Reference in New Issue
Block a user