Move everything under kotlin-native folder

I was forced to manually do update the following files, because otherwise
they would be ignored according .gitignore settings. Probably they
should be deleted from repo.

Interop/.idea/compiler.xml
Interop/.idea/gradle.xml
Interop/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_runtime_1_0_3.xml
Interop/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_1_0_3.xml
Interop/.idea/modules.xml
Interop/.idea/modules/Indexer/Indexer.iml
Interop/.idea/modules/Runtime/Runtime.iml
Interop/.idea/modules/StubGenerator/StubGenerator.iml
backend.native/backend.native.iml
backend.native/bc.frontend/bc.frontend.iml
backend.native/cli.bc/cli.bc.iml
backend.native/cli.bc/src/org/jetbrains/kotlin/cli/bc/K2Native.kt
backend.native/cli.bc/src/org/jetbrains/kotlin/cli/bc/K2NativeCompilerArguments.kt
backend.native/tests/link/lib/foo.kt
backend.native/tests/link/lib/foo2.kt
backend.native/tests/teamcity-test.property
This commit is contained in:
Stanislav Erokhin
2020-10-27 21:00:28 +03:00
parent 91e4162dad
commit f624800b84
2830 changed files with 0 additions and 0 deletions
@@ -0,0 +1,21 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
expect class C {
constructor(arg: Any?)
}
actual data class C actual constructor(val arg: Any?) {
}
expect class T
actual typealias T = C
expect fun f(arg: Int): Int
actual fun f(arg: Int) = arg
expect var p: String
actual var p: String = "p"
@@ -0,0 +1,36 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
package codegen.mpp.mpp1
import kotlin.test.*
fun box() {
assertEquals(A().B().fourtyTwo(), 42)
assertEquals(seventeen(), 17)
}
expect class A {
constructor()
inner class B {
fun fourtyTwo(): Int
constructor()
}
}
actual class A {
actual inner class B actual constructor() {
actual fun fourtyTwo() = 42
}
}
actual fun seventeen() = 17
expect fun seventeen(): Int
@Test fun runTest() {
box()
}
@@ -0,0 +1,13 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
fun main(args: Array<String>) {
println(C(42))
println(C(42) is T)
println(f(1))
p = "h"
println(p)
}
@@ -0,0 +1,75 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
package codegen.mpp.mpp_default_args
import kotlin.test.*
@Test fun runTest() {
box()
}
fun box() {
assertEquals(test1(), 42)
assertEquals(test2(17), 34)
assertEquals(test3(), -1)
Test4().test()
Test5().Inner().test()
42.test6()
assertEquals(inlineFunction("OK"), "OK,0,null")
}
expect fun test1(x: Int = 42): Int
actual fun test1(x: Int) = x
expect fun test2(x: Int, y: Int = x): Int
actual fun test2(x: Int, y: Int) = x + y
expect fun test3(x: Int = 42, y: Int = x + 1): Int
actual fun test3(x: Int, y: Int) = x - y
expect class Test4 {
fun test(arg: Any = this)
}
actual class Test4 {
actual fun test(arg: Any) {
assertEquals(arg, this)
}
}
expect class Test5 {
inner class Inner {
constructor(arg: Any = this@Test5)
fun test(arg1: Any = this@Test5, arg2: Any = this@Inner)
}
}
actual class Test5 {
actual inner class Inner {
actual constructor(arg: Any) {
assertEquals(arg, this@Test5)
}
actual fun test(arg1: Any, arg2: Any) {
assertEquals(arg1, this@Test5)
assertEquals(arg2, this@Inner)
}
}
}
expect fun Int.test6(arg: Int = this)
actual fun Int.test6(arg: Int) {
assertEquals(arg, this)
}
// Default parameter in inline function.
expect inline fun inlineFunction(a: String, b: Int = 0, c: () -> Double? = { null }): String
actual inline fun inlineFunction(a: String, b: Int, c: () -> Double?): String = a + "," + b + "," + c()
@@ -0,0 +1,17 @@
@file:Suppress("EXPERIMENTAL_API_USAGE_ERROR")
import kotlin.js.*
@OptionalExpectation
expect annotation class Optional()
@Optional
fun foo() { println(42) }
@JsName("jsBar")
fun bar() { println(43) }
fun main(args: Array<String>) {
foo()
bar()
}