Rename: jps-plugin -> jps/jps-plugin
This commit is contained in:
+3
@@ -0,0 +1,3 @@
|
||||
package test
|
||||
|
||||
fun a() = "a"
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
package test
|
||||
|
||||
fun b() = "b"
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
================ Step #1 =================
|
||||
|
||||
Cleaning output files:
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
out/production/module/test/BKt.class
|
||||
out/production/module/test/UsageKt.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/b.kt
|
||||
src/usage.kt
|
||||
End of files
|
||||
Exit code: OK
|
||||
------------------------------------------
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
package other
|
||||
|
||||
fun other() = "other"
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
package test
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
println(a() + b() + other.other())
|
||||
}
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
package test
|
||||
|
||||
var a = "a"
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// TODO add var
|
||||
package test
|
||||
|
||||
var b = "b"
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
================ Step #1 =================
|
||||
|
||||
Cleaning output files:
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
out/production/module/test/BKt.class
|
||||
out/production/module/test/UsageKt.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/b.kt
|
||||
src/usage.kt
|
||||
End of files
|
||||
Exit code: OK
|
||||
------------------------------------------
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
package other
|
||||
|
||||
var other = "other"
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
package test
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val x = a + b + other.other
|
||||
a = "aa"
|
||||
b = "bb"
|
||||
other.other = "other.other"
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
package foo
|
||||
|
||||
class A
|
||||
@@ -0,0 +1,21 @@
|
||||
================ Step #1 =================
|
||||
|
||||
Compiling files:
|
||||
src/A.kt
|
||||
End of files
|
||||
Marked as dirty by Kotlin:
|
||||
src/funA.kt
|
||||
src/useA.kt
|
||||
Exit code: ADDITIONAL_PASS_REQUIRED
|
||||
------------------------------------------
|
||||
Cleaning output files:
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
out/production/module/foo/FunAKt.class
|
||||
out/production/module/use/UseAKt.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/funA.kt
|
||||
src/useA.kt
|
||||
End of files
|
||||
Exit code: OK
|
||||
------------------------------------------
|
||||
@@ -0,0 +1,3 @@
|
||||
package foo
|
||||
|
||||
fun A(a: Int = 1){}
|
||||
@@ -0,0 +1,3 @@
|
||||
package other
|
||||
|
||||
fun f() {}
|
||||
@@ -0,0 +1,7 @@
|
||||
package use
|
||||
|
||||
import foo.*
|
||||
|
||||
fun useA() {
|
||||
A()
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
================ Step #1 =================
|
||||
|
||||
Compiling files:
|
||||
src/foo2.kt
|
||||
End of files
|
||||
Marked as dirty by Kotlin:
|
||||
src/foo1.kt
|
||||
src/use.kt
|
||||
Exit code: ADDITIONAL_PASS_REQUIRED
|
||||
------------------------------------------
|
||||
Cleaning output files:
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
out/production/module/foo/Foo1Kt.class
|
||||
out/production/module/use/UseKt.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/foo1.kt
|
||||
src/use.kt
|
||||
End of files
|
||||
Exit code: OK
|
||||
------------------------------------------
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
package foo
|
||||
|
||||
fun f(a: Any) {}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
package foo
|
||||
|
||||
fun f(a: Int) {}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
package other
|
||||
|
||||
fun f() {}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package use
|
||||
|
||||
import foo.*
|
||||
|
||||
fun useA() {
|
||||
f(1)
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package a
|
||||
|
||||
class Outer {
|
||||
inner class B(x: String)
|
||||
|
||||
fun A1(x: Any) = x
|
||||
fun A2(x: Any) = x
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package a
|
||||
|
||||
class Outer {
|
||||
inner class B(x: String)
|
||||
|
||||
@Suppress("TOPLEVEL_TYPEALIASES_ONLY")
|
||||
typealias A1 = B
|
||||
@Suppress("TOPLEVEL_TYPEALIASES_ONLY")
|
||||
private typealias A2 = B
|
||||
|
||||
fun A1(x: Any) = x
|
||||
fun A2(x: Any) = x
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package usage
|
||||
|
||||
fun bar() {
|
||||
a.Outer().A1("")
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package usage
|
||||
|
||||
fun baz() {
|
||||
a.Outer().A2("")
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
================ Step #1 =================
|
||||
|
||||
Cleaning output files:
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
out/production/module/a/Outer$B.class
|
||||
out/production/module/a/Outer.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/a.kt
|
||||
End of files
|
||||
Marked as dirty by Kotlin:
|
||||
src/a1Usage.kt
|
||||
Exit code: ADDITIONAL_PASS_REQUIRED
|
||||
------------------------------------------
|
||||
Cleaning output files:
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
out/production/module/usage/A1UsageKt.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/a1Usage.kt
|
||||
End of files
|
||||
Exit code: OK
|
||||
------------------------------------------
|
||||
@@ -0,0 +1,6 @@
|
||||
package a
|
||||
|
||||
class B(x: String)
|
||||
|
||||
fun A1(x: Any) = x
|
||||
fun A2(x: Any) = x
|
||||
@@ -0,0 +1,8 @@
|
||||
package a
|
||||
|
||||
class B(x: String)
|
||||
typealias A1 = B
|
||||
private typealias A2 = B
|
||||
|
||||
fun A1(x: Any) = x
|
||||
fun A2(x: Any) = x
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
package usage
|
||||
|
||||
fun bar() {
|
||||
a.A1("")
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
package usage
|
||||
|
||||
fun baz() {
|
||||
a.A2("")
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
================ Step #1 =================
|
||||
|
||||
Cleaning output files:
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
out/production/module/a/AKt.class
|
||||
out/production/module/a/B.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/a.kt
|
||||
End of files
|
||||
Marked as dirty by Kotlin:
|
||||
src/a1Usage.kt
|
||||
Exit code: ADDITIONAL_PASS_REQUIRED
|
||||
------------------------------------------
|
||||
Cleaning output files:
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
out/production/module/usage/A1UsageKt.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/a1Usage.kt
|
||||
End of files
|
||||
Exit code: OK
|
||||
------------------------------------------
|
||||
@@ -0,0 +1 @@
|
||||
-XXLanguage:-ApproximateIntegerLiteralTypesInReceiverPosition -XXLanguage:-ProhibitSimplificationOfNonTrivialConstBooleanExpressions
|
||||
@@ -0,0 +1,34 @@
|
||||
================ Step #1 =================
|
||||
|
||||
Cleaning output files:
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
out/production/module/test/ConstKt.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/const.kt
|
||||
End of files
|
||||
Exit code: OK
|
||||
------------------------------------------
|
||||
|
||||
================ Step #2 =================
|
||||
|
||||
Cleaning output files:
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
out/production/module/test/ConstKt.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/const.kt
|
||||
End of files
|
||||
Marked as dirty by Kotlin:
|
||||
src/usage.kt
|
||||
Exit code: ADDITIONAL_PASS_REQUIRED
|
||||
------------------------------------------
|
||||
Cleaning output files:
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
out/production/module/test/Usage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/usage.kt
|
||||
End of files
|
||||
Exit code: OK
|
||||
------------------------------------------
|
||||
@@ -0,0 +1,12 @@
|
||||
package test
|
||||
|
||||
const val b: Byte = 100
|
||||
const val s: Short = 20000
|
||||
const val i: Int = 2000000
|
||||
const val l: Long = 2000000000000L
|
||||
const val f: Float = 3.14f
|
||||
const val d: Double = 3.14
|
||||
const val bb: Boolean = true
|
||||
const val c: Char = '\u03c0' // pi symbol
|
||||
|
||||
const val str: String = ":)"
|
||||
@@ -0,0 +1,12 @@
|
||||
package test
|
||||
|
||||
const val b: Byte = 50 + 50
|
||||
const val s: Short = 10000 + 10000
|
||||
const val i: Int = 1000000 + 1000000
|
||||
const val l: Long = 1000000000000L + 1000000000000L
|
||||
const val f: Float = 0.0f + 3.14f
|
||||
const val d: Double = 0.0 + 3.14
|
||||
const val bb: Boolean = !false
|
||||
const val c: Char = '\u03c0' // pi symbol
|
||||
|
||||
const val str: String = ":)"
|
||||
@@ -0,0 +1,12 @@
|
||||
package test
|
||||
|
||||
const val b: Byte = 0
|
||||
const val s: Short = 0
|
||||
const val i: Int = 0
|
||||
const val l: Long = 0
|
||||
const val f: Float = 0.0f
|
||||
const val d: Double = 0.0
|
||||
const val bb: Boolean = false
|
||||
const val c: Char = 'x'
|
||||
|
||||
const val str: String = ":("
|
||||
@@ -0,0 +1,19 @@
|
||||
================ Step #1 =================
|
||||
|
||||
Compiling files:
|
||||
src/const.kt
|
||||
End of files
|
||||
Exit code: ABORT
|
||||
------------------------------------------
|
||||
COMPILATION FAILED
|
||||
Type mismatch: inferred type is kotlin/Int but kotlin/Byte was expected
|
||||
Type mismatch: inferred type is kotlin/Int but kotlin/Short was expected
|
||||
|
||||
================ Step #2 =================
|
||||
|
||||
Compiling files:
|
||||
src/const.kt
|
||||
src/usage.kt
|
||||
End of files
|
||||
Exit code: OK
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
package test
|
||||
|
||||
@Deprecated("$b $s $i $l $f $d $bb $c $str")
|
||||
class Usage
|
||||
@@ -0,0 +1,13 @@
|
||||
package test
|
||||
|
||||
annotation class Anno
|
||||
|
||||
@Anno fun f() {
|
||||
}
|
||||
|
||||
@Anno val v1 = ""
|
||||
|
||||
var v2: String
|
||||
get() = ""
|
||||
@Anno set(value) {
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
================ Step #1 =================
|
||||
|
||||
Cleaning output files:
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
out/production/module/test/OtherKt.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/other.kt
|
||||
End of files
|
||||
Exit code: OK
|
||||
------------------------------------------
|
||||
@@ -0,0 +1,4 @@
|
||||
package test
|
||||
|
||||
fun dummyFunction() {
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package a
|
||||
|
||||
fun foo() = object {
|
||||
fun bar() = ":("
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
package a
|
||||
|
||||
fun foo() = object {
|
||||
fun baz() = ":)"
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
================ Step #1 =================
|
||||
|
||||
Cleaning output files:
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
out/production/module/a/AKt$foo$1.class
|
||||
out/production/module/a/AKt.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/a.kt
|
||||
End of files
|
||||
Exit code: OK
|
||||
------------------------------------------
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
package usage
|
||||
|
||||
import a.foo
|
||||
|
||||
fun bar() = foo()
|
||||
Vendored
+33
@@ -0,0 +1,33 @@
|
||||
================ Step #1 =================
|
||||
|
||||
Cleaning output files:
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
out/production/module/test/Usage1Kt.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/usage1.kt
|
||||
End of files
|
||||
Marked as dirty by Kotlin:
|
||||
src/usage2.kt
|
||||
Exit code: ADDITIONAL_PASS_REQUIRED
|
||||
------------------------------------------
|
||||
Cleaning output files:
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
out/production/module/test/Usage2Kt.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/usage2.kt
|
||||
End of files
|
||||
Marked as dirty by Kotlin:
|
||||
src/usage1.kt
|
||||
Exit code: ADDITIONAL_PASS_REQUIRED
|
||||
------------------------------------------
|
||||
Cleaning output files:
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
out/production/module/test/Usage1Kt.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/usage1.kt
|
||||
End of files
|
||||
Exit code: OK
|
||||
------------------------------------------
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
package foo
|
||||
|
||||
fun dummy() {}
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
package test
|
||||
|
||||
fun foo() = ""
|
||||
|
||||
fun baz() = bar()
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
package test
|
||||
|
||||
fun foo() = 1
|
||||
|
||||
fun baz() = bar()
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
package test
|
||||
|
||||
fun bar() = foo()
|
||||
@@ -0,0 +1,3 @@
|
||||
package test
|
||||
|
||||
fun bar() = foo()
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
================ Step #1 =================
|
||||
|
||||
Cleaning output files:
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
out/production/module/test/BarKt.class
|
||||
End of files
|
||||
Cleaning output files:
|
||||
out/production/module/test/FooKt.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/foo.kt
|
||||
End of files
|
||||
Exit code: OK
|
||||
------------------------------------------
|
||||
@@ -0,0 +1,3 @@
|
||||
package test
|
||||
|
||||
fun foo() = ""
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
package test
|
||||
|
||||
fun foo() = 1
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
================ Step #1 =================
|
||||
|
||||
Cleaning output files:
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
out/production/module/inline/Klass.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/inline.kt
|
||||
End of files
|
||||
Marked as dirty by Kotlin:
|
||||
src/usage.kt
|
||||
Exit code: ADDITIONAL_PASS_REQUIRED
|
||||
------------------------------------------
|
||||
Cleaning output files:
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
out/production/module/usage/UsageKt.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/usage.kt
|
||||
End of files
|
||||
Exit code: OK
|
||||
------------------------------------------
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
package inline
|
||||
|
||||
class Klass {
|
||||
inline fun f(body: () -> Unit) {
|
||||
println("i'm inline function")
|
||||
body()
|
||||
}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
package inline
|
||||
|
||||
class Klass {
|
||||
inline fun f(body: () -> Unit) {
|
||||
body()
|
||||
println("i'm inline function")
|
||||
}
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
================ Step #1 =================
|
||||
|
||||
Compiling files:
|
||||
src/inline.kt
|
||||
End of files
|
||||
Exit code: OK
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
package usage
|
||||
|
||||
fun other() {}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
package usage
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
inline.Klass().f { println("to be inlined") }
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
================ Step #1 =================
|
||||
|
||||
Cleaning output files:
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
out/production/module/test/Klass$Companion.class
|
||||
out/production/module/test/Klass.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/const.kt
|
||||
End of files
|
||||
Marked as dirty by Kotlin:
|
||||
src/usage.kt
|
||||
Exit code: ADDITIONAL_PASS_REQUIRED
|
||||
------------------------------------------
|
||||
Cleaning output files:
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
out/production/module/test/Usage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/usage.kt
|
||||
End of files
|
||||
Exit code: OK
|
||||
------------------------------------------
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
package test
|
||||
|
||||
class Klass {
|
||||
companion object {
|
||||
// Old and new constant values are different, but their hashes are the same
|
||||
const val CONST = "BF"
|
||||
}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
package test
|
||||
|
||||
class Klass {
|
||||
companion object {
|
||||
// Old and new constant values are different, but their hashes are the same
|
||||
const val CONST = "Ae"
|
||||
}
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
package test
|
||||
|
||||
@Deprecated(Klass.CONST + Klass.CONST)
|
||||
class Usage
|
||||
@@ -0,0 +1,3 @@
|
||||
package test
|
||||
|
||||
class A
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
package test
|
||||
|
||||
class A
|
||||
@@ -0,0 +1,18 @@
|
||||
================ Step #1 =================
|
||||
|
||||
Cleaning output files:
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
out/production/module/test/A.class
|
||||
End of files
|
||||
Compiling files:
|
||||
End of files
|
||||
Exit code: OK
|
||||
------------------------------------------
|
||||
|
||||
================ Step #2 =================
|
||||
|
||||
Compiling files:
|
||||
src/A.kt
|
||||
End of files
|
||||
Exit code: OK
|
||||
------------------------------------------
|
||||
@@ -0,0 +1,4 @@
|
||||
package test
|
||||
|
||||
fun other() {
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
package test
|
||||
|
||||
class A
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
================ Step #1 =================
|
||||
|
||||
Cleaning output files:
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
out/production/module/test/A.class
|
||||
End of files
|
||||
Compiling files:
|
||||
End of files
|
||||
Exit code: OK
|
||||
------------------------------------------
|
||||
@@ -0,0 +1,4 @@
|
||||
package test
|
||||
|
||||
fun other() {
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
================ Step #1 =================
|
||||
|
||||
Cleaning output files:
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
out/production/module/test/Klass.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/class.kt
|
||||
End of files
|
||||
Marked as dirty by Kotlin:
|
||||
src/usage.kt
|
||||
Exit code: ADDITIONAL_PASS_REQUIRED
|
||||
------------------------------------------
|
||||
Cleaning output files:
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
out/production/module/test/UsageKt.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/usage.kt
|
||||
End of files
|
||||
Exit code: OK
|
||||
------------------------------------------
|
||||
@@ -0,0 +1,5 @@
|
||||
package test
|
||||
|
||||
class Klass {
|
||||
fun foo() = ":)"
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
package test
|
||||
|
||||
class Klass {
|
||||
fun foo() = 123
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
package foo
|
||||
|
||||
fun dummy() {}
|
||||
@@ -0,0 +1,5 @@
|
||||
package test
|
||||
|
||||
fun usage(a: Klass) {
|
||||
a.foo()
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
================ Step #1 =================
|
||||
|
||||
Cleaning output files:
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
out/production/module/test/Klass.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/class.kt
|
||||
End of files
|
||||
Exit code: OK
|
||||
------------------------------------------
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package test
|
||||
|
||||
class Klass {
|
||||
fun foo() = ":)"
|
||||
|
||||
fun bar() = ":("
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
package test
|
||||
|
||||
// swapped functions
|
||||
class Klass {
|
||||
fun bar() = ":("
|
||||
|
||||
fun foo() = ":)"
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
package test
|
||||
|
||||
fun usage(a: Klass) {
|
||||
a.foo()
|
||||
a.bar()
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package test
|
||||
|
||||
class A {
|
||||
companion object {
|
||||
const val CONSTANT_VALUE = 16
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package test
|
||||
|
||||
class A {
|
||||
companion object {
|
||||
const val CONSTANT_VALUE = 17
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package foo
|
||||
|
||||
import test.A.Companion.CONSTANT_VALUE
|
||||
|
||||
class B {
|
||||
companion object {
|
||||
fun main() {
|
||||
println("Import companion constant: ${CONSTANT_VALUE}")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package foo
|
||||
|
||||
import test.A
|
||||
|
||||
class C {
|
||||
companion object {
|
||||
fun main() {
|
||||
println("Companion constant: ${A.CONSTANT_VALUE}")
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
package foo
|
||||
|
||||
class DoNotUseConstant {
|
||||
companion object {
|
||||
const val CONSTANT_VALUE = 10
|
||||
fun main() {
|
||||
println("Use local constant: ${CONSTANT_VALUE}")
|
||||
}
|
||||
}
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
================ Step #1 =================
|
||||
|
||||
Cleaning output files:
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
out/production/module/test/A$Companion.class
|
||||
out/production/module/test/A.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/A.kt
|
||||
End of files
|
||||
Marked as dirty by Kotlin:
|
||||
src/B.kt
|
||||
src/C.kt
|
||||
src/companionUsage.kt
|
||||
src/constantUsage.kt
|
||||
Exit code: ADDITIONAL_PASS_REQUIRED
|
||||
------------------------------------------
|
||||
Cleaning output files:
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
out/production/module/foo/B$Companion.class
|
||||
out/production/module/foo/B.class
|
||||
out/production/module/foo/C$Companion.class
|
||||
out/production/module/foo/C.class
|
||||
out/production/module/foo/CompanionUsageKt.class
|
||||
out/production/module/foo/ConstantUsageKt.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/B.kt
|
||||
src/C.kt
|
||||
src/companionUsage.kt
|
||||
src/constantUsage.kt
|
||||
End of files
|
||||
Exit code: OK
|
||||
------------------------------------------
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
package foo
|
||||
|
||||
import test.A
|
||||
|
||||
fun callCompanionConstant() = "Companion constant: ${A.CONSTANT_VALUE}"
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
package foo
|
||||
|
||||
import test.A.Companion.CONSTANT_VALUE
|
||||
|
||||
fun importCompanionConstant() = "Import companion constant: ${CONSTANT_VALUE}"
|
||||
|
||||
Vendored
+21
@@ -0,0 +1,21 @@
|
||||
================ Step #1 =================
|
||||
|
||||
Cleaning output files:
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
out/production/module/usage/UsageKt.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/usage.kt
|
||||
End of files
|
||||
Exit code: ABORT
|
||||
------------------------------------------
|
||||
COMPILATION FAILED
|
||||
Expecting an expression
|
||||
|
||||
================ Step #2 =================
|
||||
|
||||
Compiling files:
|
||||
src/usage.kt
|
||||
End of files
|
||||
Exit code: OK
|
||||
------------------------------------------
|
||||
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
package f
|
||||
|
||||
fun f() {
|
||||
}
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
package usage
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
f.f()
|
||||
}
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
package usage
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
f.f(
|
||||
}
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
package usage
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
f.f()
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user