fix: external declarations in implicit export.
This commit is contained in:
@@ -37,5 +37,9 @@ declare namespace JS_TESTS {
|
||||
class H /* extends foo.NonExportedGenericType<foo.NonExportedType> */ {
|
||||
constructor();
|
||||
}
|
||||
function foo(a: number): Promise<number>;
|
||||
function bar(): Error;
|
||||
const console: Console;
|
||||
const error: WebAssembly.CompileError;
|
||||
}
|
||||
}
|
||||
|
||||
+34
-1
@@ -2,12 +2,27 @@
|
||||
// RUN_PLAIN_BOX_FUNCTION
|
||||
// SKIP_MINIFICATION
|
||||
// SKIP_NODE_JS
|
||||
// KJS_WITH_FULL_RUNTIME
|
||||
// INFER_MAIN_MODULE
|
||||
// MODULE: JS_TESTS
|
||||
// FILE: qualified.kt
|
||||
@file:JsQualifier("WebAssembly")
|
||||
package qualified
|
||||
|
||||
external interface CompileError
|
||||
|
||||
// FILE: notQualified.kt
|
||||
package notQualified
|
||||
|
||||
external interface Console
|
||||
|
||||
// FILE: declarations.kt
|
||||
|
||||
package foo
|
||||
|
||||
import notQualified.Console
|
||||
import qualified.CompileError
|
||||
|
||||
interface NonExportedInterface
|
||||
interface NonExportedGenericInterface<T>
|
||||
open class NonExportedType(val value: Int)
|
||||
@@ -52,4 +67,22 @@ class F : A(NonExportedType(42)), NonExportedInterface
|
||||
class G : NonExportedGenericInterface<NonExportedType>
|
||||
|
||||
@JsExport
|
||||
class H : NonExportedGenericType<NonExportedType>(NonExportedType(42))
|
||||
class H : NonExportedGenericType<NonExportedType>(NonExportedType(42))
|
||||
|
||||
@JsExport
|
||||
fun foo(a: Int): kotlin.js.Promise<Int> {
|
||||
return kotlin.js.Promise<Int> { res, rej -> res(a) }
|
||||
}
|
||||
|
||||
@JsExport
|
||||
fun bar(): Throwable {
|
||||
return Throwable("Test Error")
|
||||
}
|
||||
|
||||
@JsExport
|
||||
val console: Console
|
||||
get() = js("console")
|
||||
|
||||
@JsExport
|
||||
val error: CompileError
|
||||
get() = js("{}")
|
||||
Reference in New Issue
Block a user