Remove default import "kotlin.reflect"

Basic reflection is usable without any imports (with :: literals)

This reverts commit 9503056dd5.
This commit is contained in:
Alexander Udalov
2014-07-01 17:42:35 +04:00
parent d32a02f21a
commit a38a396a43
67 changed files with 122 additions and 4 deletions
@@ -1,3 +1,5 @@
import kotlin.reflect.KMemberProperty
trait Base {
val x: Any
}
@@ -1,3 +1,5 @@
import kotlin.reflect.KMemberProperty
open class Base {
val foo: Int = 42
}
@@ -1,3 +1,5 @@
import kotlin.reflect.*
class A(var g: A) {
val f: Int = 0
@@ -1,3 +1,5 @@
import kotlin.reflect.*
class A {
fun test() {
::foo : KExtensionProperty<A, String>
@@ -1,3 +1,5 @@
import kotlin.reflect.*
val String.countCharacters: Int
get() = length
@@ -1,3 +1,5 @@
import kotlin.reflect.KMemberProperty
class A<T>(val t: T) {
val foo: T = t
}
@@ -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>
@@ -15,6 +15,8 @@ public class JavaClass {
import JavaClass.*
import kotlin.reflect.*
fun test() {
::publicFinal : KTopLevelProperty<String>
::publicMutable : KMutableTopLevelProperty<Any?>
@@ -1,3 +1,5 @@
import kotlin.reflect.*
class A {
val foo: Unit = Unit.VALUE
var bar: String = ""
@@ -1,3 +1,5 @@
import kotlin.reflect.*
class A {
val foo: Int = 42
var bar: String = ""
@@ -1,3 +1,5 @@
import kotlin.reflect.*
var x: Int = 42
val y: String get() = "y"