diff --git a/compiler/testData/codegen/box/classes/kt903.kt b/compiler/testData/codegen/box/classes/kt903.kt index 5c3e51cbe41..b4a75ee8128 100644 --- a/compiler/testData/codegen/box/classes/kt903.kt +++ b/compiler/testData/codegen/box/classes/kt903.kt @@ -1,3 +1,5 @@ +// TARGET_BACKEND: JVM + operator fun Int.plus(a: Int?) = this + a!! public open class PerfectNumberFinder() { diff --git a/idea/idea-completion/testData/basic/common/InExpressionNoPrefix.kt b/idea/idea-completion/testData/basic/common/InExpressionNoPrefix.kt index e70dc90027b..3f6f1383634 100644 --- a/idea/idea-completion/testData/basic/common/InExpressionNoPrefix.kt +++ b/idea/idea-completion/testData/basic/common/InExpressionNoPrefix.kt @@ -4,5 +4,5 @@ class Test { } } -// EXIST: Any, Nothing, Unit, Int, Number, Array, Math +// EXIST: Any, Nothing, Unit, Int, Number, Array // EXIST_JAVA_ONLY: Thread \ No newline at end of file diff --git a/idea/idea-completion/testData/basic/common/InExtendTypeAnnotation.kt b/idea/idea-completion/testData/basic/common/InExtendTypeAnnotation.kt index 44b340ccb41..dc0211fcf5c 100644 --- a/idea/idea-completion/testData/basic/common/InExtendTypeAnnotation.kt +++ b/idea/idea-completion/testData/basic/common/InExtendTypeAnnotation.kt @@ -3,5 +3,5 @@ class Test : { } } -// EXIST: Any, Nothing, Unit, Int, Number, Array, Math +// EXIST: Any, Nothing, Unit, Int, Number, Array // EXIST_JAVA_ONLY: Thread \ No newline at end of file diff --git a/idea/testData/editor/optimizeImports/js/DefaultJsImports.kt b/idea/testData/editor/optimizeImports/js/DefaultJsImports.kt index d28c8eb9519..2aca1955775 100644 --- a/idea/testData/editor/optimizeImports/js/DefaultJsImports.kt +++ b/idea/testData/editor/optimizeImports/js/DefaultJsImports.kt @@ -1,7 +1,12 @@ +import kotlin.js.json import kotlin.js.Json +import kotlin.js.JSON +import kotlin.js.undefined fun main(args: Array) { - val a: Json? = null + val a: dynamic = undefined + val b = JSON.stringify(a) + val j: Json = json("a" to 1) } // For KT-3620 Don't auto-import kotlin.js.* and remove in `optimize imports` diff --git a/idea/testData/editor/optimizeImports/js/DefaultJsImports.kt.after b/idea/testData/editor/optimizeImports/js/DefaultJsImports.kt.after index 8d14e6c8330..71337f115af 100644 --- a/idea/testData/editor/optimizeImports/js/DefaultJsImports.kt.after +++ b/idea/testData/editor/optimizeImports/js/DefaultJsImports.kt.after @@ -1,5 +1,10 @@ +import kotlin.js.Json +import kotlin.js.json + fun main(args: Array) { - val a: Json? = null + val a: dynamic = undefined + val b = JSON.stringify(a) + val j: Json = json("a" to 1) } // For KT-3620 Don't auto-import kotlin.js.* and remove in `optimize imports` diff --git a/idea/testData/editor/optimizeImports/js/DefaultJsImports.kt.log b/idea/testData/editor/optimizeImports/js/DefaultJsImports.kt.log new file mode 100644 index 00000000000..71c5b264dd8 --- /dev/null +++ b/idea/testData/editor/optimizeImports/js/DefaultJsImports.kt.log @@ -0,0 +1,4 @@ +Additional checking of reference Getter: JSON +Additional checking of reference KtSimpleNameReference: JSON +Additional checking of reference Getter: undefined +Additional checking of reference KtSimpleNameReference: undefined diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java index 5133e1f58d3..0f94af6c88d 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java @@ -3882,12 +3882,6 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { doTest(fileName); } - @TestMetadata("kt903.kt") - public void testKt903() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt903.kt"); - doTest(fileName); - } - @TestMetadata("kt940.kt") public void testKt940() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt940.kt"); diff --git a/js/js.translator/testData/webDemoCanvasExamples/cases/Creatures.kt b/js/js.translator/testData/webDemoCanvasExamples/cases/Creatures.kt index e62bc36fad0..dfeb70cc0e7 100644 --- a/js/js.translator/testData/webDemoCanvasExamples/cases/Creatures.kt +++ b/js/js.translator/testData/webDemoCanvasExamples/cases/Creatures.kt @@ -5,6 +5,7 @@ package creatures import jquery.* +import kotlin.js.* import kotlin.browser.window import org.w3c.dom.* diff --git a/js/js.translator/testData/webDemoCanvasExamples/cases/Fancy lines.kt b/js/js.translator/testData/webDemoCanvasExamples/cases/Fancy lines.kt index b8925040321..d48bb3ccfb7 100644 --- a/js/js.translator/testData/webDemoCanvasExamples/cases/Fancy lines.kt +++ b/js/js.translator/testData/webDemoCanvasExamples/cases/Fancy lines.kt @@ -6,6 +6,7 @@ Note that only a subset of the api is supported for now. package fancylines +import kotlin.js.* import kotlin.browser.window import org.w3c.dom.* import jquery.* diff --git a/js/js.translator/testData/webDemoCanvasExamples/cases/Hello, Kotlin.kt b/js/js.translator/testData/webDemoCanvasExamples/cases/Hello, Kotlin.kt index 26e50c9d7ab..6f9196e9533 100644 --- a/js/js.translator/testData/webDemoCanvasExamples/cases/Hello, Kotlin.kt +++ b/js/js.translator/testData/webDemoCanvasExamples/cases/Hello, Kotlin.kt @@ -3,6 +3,7 @@ */ package hello +import kotlin.js.* import kotlin.browser.window import org.w3c.dom.* import jquery.* diff --git a/js/js.translator/testData/webDemoCanvasExamples/cases/Traffic light.kt b/js/js.translator/testData/webDemoCanvasExamples/cases/Traffic light.kt index 676e1325396..1c8debba7ae 100644 --- a/js/js.translator/testData/webDemoCanvasExamples/cases/Traffic light.kt +++ b/js/js.translator/testData/webDemoCanvasExamples/cases/Traffic light.kt @@ -1,5 +1,6 @@ package traffic +import kotlin.js.* import kotlin.browser.window import org.w3c.dom.* import jquery.*