Remove js classes that should not be there
This commit is contained in:
@@ -11,6 +11,10 @@ public object SomeClass {
|
||||
public fun run(): Unit = work.run()
|
||||
}
|
||||
|
||||
interface Runnable {
|
||||
fun run(): Unit
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
SomeClass.run()
|
||||
return "OK"
|
||||
|
||||
@@ -28,4 +28,8 @@ class C {
|
||||
}
|
||||
}
|
||||
|
||||
interface Runnable {
|
||||
fun run(): Unit
|
||||
}
|
||||
|
||||
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"
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
package kotlin.js
|
||||
|
||||
import java.util.*
|
||||
|
||||
@native
|
||||
public val noImpl: Nothing
|
||||
get() = throw Exception()
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
package java.io
|
||||
|
||||
@library
|
||||
public class IOException(message: String = "") : Exception() {}
|
||||
|
||||
@library
|
||||
public interface Closeable {
|
||||
public fun close(): Unit
|
||||
}
|
||||
|
||||
interface Serializable
|
||||
internal interface Serializable
|
||||
@@ -16,14 +16,6 @@
|
||||
|
||||
package java.lang
|
||||
|
||||
@library
|
||||
public interface Runnable {
|
||||
public fun run(): Unit
|
||||
}
|
||||
|
||||
public fun Runnable(action: () -> Unit): Runnable = object : Runnable {
|
||||
override fun run() = action()
|
||||
}
|
||||
|
||||
@library
|
||||
public interface Appendable {
|
||||
|
||||
@@ -26,6 +26,8 @@ public inline fun <T> Comparator(crossinline comparison: (T, T) -> Int): Compara
|
||||
}
|
||||
|
||||
|
||||
// TODO: Not supported
|
||||
// typealias Date = kotlin.js.Date
|
||||
|
||||
@native
|
||||
public class Date() {
|
||||
|
||||
-5
@@ -212,7 +212,6 @@
|
||||
Kotlin.IndexOutOfBoundsException = createClassNowWithMessage(Kotlin.RuntimeException);
|
||||
Kotlin.ConcurrentModificationException = createClassNowWithMessage(Kotlin.RuntimeException);
|
||||
Kotlin.ClassCastException = createClassNowWithMessage(Kotlin.RuntimeException);
|
||||
Kotlin.IOException = createClassNowWithMessage(Kotlin.Exception);
|
||||
Kotlin.AssertionError = createClassNowWithMessage(Kotlin.Error);
|
||||
|
||||
Kotlin.throwNPE = function (message) {
|
||||
@@ -333,10 +332,6 @@
|
||||
);
|
||||
|
||||
|
||||
Kotlin.Runnable = Kotlin.createTraitNow(null, null, {
|
||||
run: throwAbstractFunctionInvocationError("Runnable#run")
|
||||
});
|
||||
|
||||
Kotlin.Comparable = Kotlin.createTraitNow(null, null, {
|
||||
compareTo: throwAbstractFunctionInvocationError("Comparable#compareTo")
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user