Rename: jps-plugin -> jps/jps-plugin
This commit is contained in:
@@ -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}"
|
||||
|
||||
Reference in New Issue
Block a user