Private visibility for non-const, non-jvmField class companion property backing field

This commit is contained in:
Michael Bogdanov
2015-12-25 15:05:31 +03:00
parent 85ae0cb78e
commit e116cc3206
76 changed files with 299 additions and 157 deletions
@@ -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"
}
}
@@ -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"
}
}
@@ -2,6 +2,6 @@ package test
class Klass {
companion object {
val CONST = "bar"
const val CONST = "bar"
}
}
@@ -0,0 +1,7 @@
import test.*;
class Usage {
public static void main(String[] args) {
System.out.println(Klass.CONST + Klass.CONST);
}
}
@@ -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
@@ -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"
}
}
@@ -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"
}
}
@@ -0,0 +1,7 @@
import test.*;
class Usage {
public static void main(String[] args) {
System.out.println(Klass.CONST + Klass.CONST);
}
}
@@ -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
@@ -0,0 +1,8 @@
package test
class Klass {
companion object {
@JvmField
val CONST = "bar"
}
}