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:
+21
@@ -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.propertyCallableReference.dynamicReceiver
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
class TestClass {
|
||||
var x: Int = 42
|
||||
}
|
||||
|
||||
fun foo(): TestClass {
|
||||
println(42)
|
||||
return TestClass()
|
||||
}
|
||||
|
||||
@Test fun runTest() {
|
||||
foo()::x
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
/*
|
||||
* 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 a
|
||||
|
||||
class A(val x: Int)
|
||||
@@ -0,0 +1,14 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
import a.A
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val p1 = A::x
|
||||
println(p1.get(A(42)))
|
||||
val a = A(117)
|
||||
val p2 = a::x
|
||||
println(p2.get())
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
* 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.propertyCallableReference.valClass
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
class A(val x: Int)
|
||||
|
||||
@Test fun runTest() {
|
||||
val p1 = A::x
|
||||
println(p1.get(A(42)))
|
||||
val a = A(117)
|
||||
val p2 = a::x
|
||||
println(p2.get())
|
||||
}
|
||||
@@ -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.propertyCallableReference.valExtension
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
class A(y: Int) {
|
||||
var x = y
|
||||
}
|
||||
|
||||
val A.z get() = this.x
|
||||
|
||||
@Test fun runTest() {
|
||||
val p1 = A::z
|
||||
println(p1.get(A(42)))
|
||||
val a = A(117)
|
||||
val p2 = a::z
|
||||
println(p2.get())
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
/*
|
||||
* 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.propertyCallableReference.valModule
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
val x = 42
|
||||
|
||||
@Test fun runTest() {
|
||||
val p = ::x
|
||||
println(p.get())
|
||||
}
|
||||
@@ -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.propertyCallableReference.varClass
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
class A(var x: Int)
|
||||
|
||||
@Test fun runTest() {
|
||||
val p1 = A::x
|
||||
val a = A(42)
|
||||
p1.set(a, 117)
|
||||
println(a.x)
|
||||
println(p1.get(a))
|
||||
val p2 = a::x
|
||||
p2.set(42)
|
||||
println(a.x)
|
||||
println(p2.get())
|
||||
}
|
||||
@@ -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.propertyCallableReference.varExtension
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
class A(y: Int) {
|
||||
var x = y
|
||||
}
|
||||
|
||||
var A.z: Int
|
||||
get() = this.x
|
||||
set(value: Int) {
|
||||
this.x = value
|
||||
}
|
||||
|
||||
@Test fun runTest() {
|
||||
val p1 = A::z
|
||||
val a = A(42)
|
||||
p1.set(a, 117)
|
||||
println(a.x)
|
||||
println(p1.get(a))
|
||||
val p2 = a::z
|
||||
p2.set(42)
|
||||
println(a.x)
|
||||
println(p2.get())
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
* 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.propertyCallableReference.varModule
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
var x = 42
|
||||
|
||||
@Test fun runTest() {
|
||||
val p = ::x
|
||||
p.set(117)
|
||||
println(x)
|
||||
println(p.get())
|
||||
}
|
||||
Reference in New Issue
Block a user