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:
@@ -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.initializers.correctOrder1
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
class TestClass {
|
||||
val x: Int
|
||||
|
||||
init {
|
||||
x = 42
|
||||
}
|
||||
|
||||
val y = x
|
||||
}
|
||||
|
||||
@Test fun runTest() {
|
||||
println(TestClass().y)
|
||||
}
|
||||
@@ -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.initializers.correctOrder2
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
class TestClass {
|
||||
val x: Int
|
||||
|
||||
val y = 42
|
||||
|
||||
init {
|
||||
x = y
|
||||
}
|
||||
}
|
||||
|
||||
@Test fun runTest() {
|
||||
println(TestClass().x)
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
val a = 10
|
||||
val b = a * 6
|
||||
val c = a * b * 2
|
||||
@@ -0,0 +1 @@
|
||||
fun main() = println(c)
|
||||
@@ -0,0 +1,3 @@
|
||||
val a = mutableListOf<Int>()
|
||||
val b = 1.also { a += 2 }
|
||||
val c = a.single()
|
||||
@@ -0,0 +1 @@
|
||||
fun main() = println(c)
|
||||
@@ -0,0 +1,13 @@
|
||||
class A {
|
||||
val x: Int
|
||||
|
||||
init {
|
||||
var y = 10
|
||||
|
||||
fun foo() { y = 42 }
|
||||
|
||||
foo()
|
||||
|
||||
x = y
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
import kotlin.test.*
|
||||
|
||||
fun main() = assertEquals(42, (A().x))
|
||||
Reference in New Issue
Block a user