Remove js classes that should not be there

This commit is contained in:
Ilya Gorbunov
2016-10-01 01:51:44 +03:00
parent 2ff8e922f0
commit a895702730
8 changed files with 15 additions and 19 deletions
+4
View File
@@ -11,6 +11,10 @@ public object SomeClass {
public fun run(): Unit = work.run() public fun run(): Unit = work.run()
} }
interface Runnable {
fun run(): Unit
}
fun box(): String { fun box(): String {
SomeClass.run() SomeClass.run()
return "OK" return "OK"
@@ -28,4 +28,8 @@ class C {
} }
} }
interface Runnable {
fun run(): Unit
}
fun box() = C().foo() fun box() = C().foo()
@@ -24,4 +24,8 @@ class C{
} }
} }
interface Runnable {
fun run(): Unit
}
fun box() = if (C().foo() == 3) "OK" else "NOT OK" fun box() = if (C().foo() == 3) "OK" else "NOT OK"
-2
View File
@@ -1,7 +1,5 @@
package kotlin.js package kotlin.js
import java.util.*
@native @native
public val noImpl: Nothing public val noImpl: Nothing
get() = throw Exception() get() = throw Exception()
+1 -4
View File
@@ -1,11 +1,8 @@
package java.io package java.io
@library
public class IOException(message: String = "") : Exception() {}
@library @library
public interface Closeable { public interface Closeable {
public fun close(): Unit public fun close(): Unit
} }
interface Serializable internal interface Serializable
-8
View File
@@ -16,14 +16,6 @@
package java.lang package java.lang
@library
public interface Runnable {
public fun run(): Unit
}
public fun Runnable(action: () -> Unit): Runnable = object : Runnable {
override fun run() = action()
}
@library @library
public interface Appendable { public interface Appendable {
+2
View File
@@ -26,6 +26,8 @@ public inline fun <T> Comparator(crossinline comparison: (T, T) -> Int): Compara
} }
// TODO: Not supported
// typealias Date = kotlin.js.Date
@native @native
public class Date() { public class Date() {
-5
View File
@@ -212,7 +212,6 @@
Kotlin.IndexOutOfBoundsException = createClassNowWithMessage(Kotlin.RuntimeException); Kotlin.IndexOutOfBoundsException = createClassNowWithMessage(Kotlin.RuntimeException);
Kotlin.ConcurrentModificationException = createClassNowWithMessage(Kotlin.RuntimeException); Kotlin.ConcurrentModificationException = createClassNowWithMessage(Kotlin.RuntimeException);
Kotlin.ClassCastException = createClassNowWithMessage(Kotlin.RuntimeException); Kotlin.ClassCastException = createClassNowWithMessage(Kotlin.RuntimeException);
Kotlin.IOException = createClassNowWithMessage(Kotlin.Exception);
Kotlin.AssertionError = createClassNowWithMessage(Kotlin.Error); Kotlin.AssertionError = createClassNowWithMessage(Kotlin.Error);
Kotlin.throwNPE = function (message) { Kotlin.throwNPE = function (message) {
@@ -333,10 +332,6 @@
); );
Kotlin.Runnable = Kotlin.createTraitNow(null, null, {
run: throwAbstractFunctionInvocationError("Runnable#run")
});
Kotlin.Comparable = Kotlin.createTraitNow(null, null, { Kotlin.Comparable = Kotlin.createTraitNow(null, null, {
compareTo: throwAbstractFunctionInvocationError("Comparable#compareTo") compareTo: throwAbstractFunctionInvocationError("Comparable#compareTo")
}); });