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,30 @@
/*
* 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.innerClass.doubleInner
import kotlin.test.*
open class Father(val param: String) {
abstract inner class InClass {
fun work(): String {
return param
}
}
inner class Child(p: String) : Father(p) {
inner class Child2 : Father.InClass {
constructor(): super()
}
}
}
fun box(): String {
return Father("fail").Child("OK").Child2().work()
}
@Test fun runTest() {
println(box())
}
@@ -0,0 +1,24 @@
/*
* 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.innerClass.generic
import kotlin.test.*
class Outer {
inner class Inner<T>(val t: T) {
fun box() = t
}
}
fun box(): String {
if (Outer().Inner("OK").box() != "OK") return "Fail"
val x: Outer.Inner<String> = Outer().Inner("OK")
return x.box()
}
@Test fun runTest() {
println(box())
}
@@ -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.
*/
package codegen.innerClass.getOuterVal
import kotlin.test.*
class Outer(val s: String) {
inner class Inner {
fun box() = s
}
}
fun box() = Outer("OK").Inner().box()
@Test fun runTest()
{
println(box())
}
@@ -0,0 +1,10 @@
/*
* 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.
*/
open class A {
open inner class Inner {
val x = 42
}
}
@@ -0,0 +1,12 @@
/*
* 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.
*/
open class B : A() {
open inner class Inner : A.Inner()
}
fun main(args: Array<String>) {
B().Inner()
}
@@ -0,0 +1,30 @@
/*
* 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.innerClass.noPrimaryConstructor
import kotlin.test.*
class Outer(val s: String) {
inner class Inner {
constructor(x: Int) {
this.x = x
}
constructor(z: String) {
x = z.length
}
val x: Int
fun foo() = s
}
}
@Test fun runTest() {
println(Outer("OK").Inner(42).foo())
println(Outer("OK").Inner("zzz").foo())
}
@@ -0,0 +1,55 @@
/*
* 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.innerClass.qualifiedThis
import kotlin.test.*
open class ABase
{
open fun zzz() = "a_base"
}
open class BBase
{
open fun zzz() = "b_base"
}
class D() {
val z = "d"
}
class A: ABase() { // implicit label @A
val z = "a"
override fun zzz() = "a"
inner class B: BBase() { // implicit label @B
val z = "b"
override fun zzz() = "b"
fun D.foo() : String { // implicit label @foo
if(this@A.z != "a") return "Fail1"
if(this@B.z != "b") return "Fail2"
if(super@A.zzz() != "a_base") return "Fail3"
if(super<BBase>.zzz() != "b_base") return "Fail4"
if(super@B.zzz() != "b_base") return "Fail5"
if(this@A.zzz() != "a") return "Fail6"
if(this@B.zzz() != "b") return "Fail7"
if(this.z != "d") return "Fail8"
return "OK"
}
fun bar(d: D): String {
return d.foo()
}
}
}
fun box() = A().B().bar(D())
@Test fun runTest() {
println(box())
}
@@ -0,0 +1,29 @@
/*
* 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.innerClass.secondaryConstructor
import kotlin.test.*
class Outer(val x: Int) {
inner class Inner() {
inner class InnerInner() {
init {
println(x)
}
lateinit var s: String
constructor(s: String) : this() {
this.s = s
}
}
}
}
@Test fun runTest() {
Outer(42).Inner().InnerInner("zzz")
}
@@ -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.
*/
package codegen.innerClass.simple
import kotlin.test.*
class Outer {
inner class Inner {
fun box() = "OK"
}
}
fun box() = Outer().Inner().box()
@Test fun runTest()
{
println(box())
}
@@ -0,0 +1,22 @@
/*
* 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.innerClass.superOuter
import kotlin.test.*
open class Outer(val outer: String) {
open inner class Inner(val inner: String): Outer(inner) {
fun foo() = outer
}
fun value() = Inner("OK").foo()
}
fun box() = Outer("Fail").value()
@Test fun runTest() {
println(box())
}