Private visibility for non-const, non-jvmField class companion property backing field
This commit is contained in:
+1
-1
@@ -3,6 +3,6 @@ package test
|
||||
class Klass {
|
||||
companion object {
|
||||
// Old and new constant values are different, but their hashes are the same
|
||||
val CONST = "BF"
|
||||
const val CONST = "BF"
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -3,6 +3,6 @@ package test
|
||||
class Klass {
|
||||
companion object {
|
||||
// Old and new constant values are different, but their hashes are the same
|
||||
val CONST = "Ae"
|
||||
const val CONST = "Ae"
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -2,6 +2,6 @@ package test
|
||||
|
||||
class Klass {
|
||||
companion object {
|
||||
val CONST = "bar"
|
||||
const val CONST = "bar"
|
||||
}
|
||||
}
|
||||
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
import test.*;
|
||||
|
||||
class Usage {
|
||||
public static void main(String[] args) {
|
||||
System.out.println(Klass.CONST + Klass.CONST);
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
Cleaning output files:
|
||||
out/production/module/test/Klass$Companion.class
|
||||
out/production/module/test/Klass.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/const.kt
|
||||
End of files
|
||||
Cleaning output files:
|
||||
out/production/module/Usage.class
|
||||
out/production/module/test/Klass$Companion.class
|
||||
out/production/module/test/Klass.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/const.kt
|
||||
End of files
|
||||
Compiling files:
|
||||
src/Usage.java
|
||||
End of files
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
package test
|
||||
|
||||
class Klass {
|
||||
companion object {
|
||||
// Old and new constant values are different, but their hashes are the same
|
||||
@JvmField
|
||||
val CONST = "BF"
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
package test
|
||||
|
||||
class Klass {
|
||||
companion object {
|
||||
// Old and new constant values are different, but their hashes are the same
|
||||
@JvmField
|
||||
val CONST = "Ae"
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
import test.*;
|
||||
|
||||
class Usage {
|
||||
public static void main(String[] args) {
|
||||
System.out.println(Klass.CONST + Klass.CONST);
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
Cleaning output files:
|
||||
out/production/module/test/Klass$Companion.class
|
||||
out/production/module/test/Klass.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/const.kt
|
||||
End of files
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
package test
|
||||
|
||||
class Klass {
|
||||
companion object {
|
||||
@JvmField
|
||||
val CONST = "bar"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user