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.KMemberProperty
|
||||
|
||||
trait Base {
|
||||
val x: Any
|
||||
}
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
import kotlin.reflect.KMemberProperty
|
||||
|
||||
open class Base {
|
||||
val foo: Int = 42
|
||||
}
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
import kotlin.reflect.*
|
||||
|
||||
class A(var g: A) {
|
||||
val f: Int = 0
|
||||
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
import kotlin.reflect.*
|
||||
|
||||
class A {
|
||||
fun test() {
|
||||
::foo : KExtensionProperty<A, String>
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
import kotlin.reflect.*
|
||||
|
||||
val String.countCharacters: Int
|
||||
get() = length
|
||||
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
import kotlin.reflect.KMemberProperty
|
||||
|
||||
class A<T>(val t: T) {
|
||||
val foo: T = t
|
||||
}
|
||||
|
||||
+2
@@ -13,6 +13,8 @@ public class JavaClass {
|
||||
|
||||
// FILE: test.kt
|
||||
|
||||
import kotlin.reflect.*
|
||||
|
||||
fun test() {
|
||||
JavaClass::publicFinal : KMemberProperty<JavaClass, Int>
|
||||
JavaClass::publicMutable : KMutableMemberProperty<JavaClass, Long>
|
||||
|
||||
+2
@@ -15,6 +15,8 @@ public class JavaClass {
|
||||
|
||||
import JavaClass.*
|
||||
|
||||
import kotlin.reflect.*
|
||||
|
||||
fun test() {
|
||||
::publicFinal : KTopLevelProperty<String>
|
||||
::publicMutable : KMutableTopLevelProperty<Any?>
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
import kotlin.reflect.*
|
||||
|
||||
class A {
|
||||
val foo: Unit = Unit.VALUE
|
||||
var bar: String = ""
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
import kotlin.reflect.*
|
||||
|
||||
class A {
|
||||
val foo: Int = 42
|
||||
var bar: String = ""
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
import kotlin.reflect.*
|
||||
|
||||
var x: Int = 42
|
||||
val y: String get() = "y"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user