Ignoring not static final fields.

Added tests with class object of trait and val inside object.

Original commit: 42cba1cc3c
This commit is contained in:
Evgeny Gerashchenko
2014-07-07 17:38:08 +04:00
parent 290b367600
commit fd8cff1f53
10 changed files with 69 additions and 1 deletions
@@ -0,0 +1,6 @@
Cleaning output files:
out/production/module/test/Object.class
End of files
Compiling files:
src/const.kt
End of files
@@ -0,0 +1,6 @@
package test
object Object {
// Value is changed, but we don't care, it is not compile-time constant, and therefore can't be inlined
val CONST = "old"
}
@@ -0,0 +1,6 @@
package test
object Object {
// Value is changed, but we don't care, it is not compile-time constant, and therefore can't be inlined
val CONST = "new"
}
@@ -0,0 +1,5 @@
package test
fun main(args: Array<String>) {
val x = Object.CONST + Object.CONST
}
@@ -0,0 +1,14 @@
Cleaning output files:
out/production/module/test/Trait$$TImpl.class
out/production/module/test/Trait$object.class
out/production/module/test/Trait.class
End of files
Compiling files:
src/const.kt
End of files
Cleaning output files:
out/production/module/test/Usage.class
End of files
Compiling files:
src/usage.kt
End of files
@@ -0,0 +1,8 @@
package test
trait Trait {
class object {
// Old and new constant values are different, but their hashes are the same
val CONST = "BF"
}
}
@@ -0,0 +1,8 @@
package test
trait Trait {
class object {
// Old and new constant values are different, but their hashes are the same
val CONST = "Ae"
}
}
@@ -0,0 +1,4 @@
package test
deprecated(Trait.CONST + Trait.CONST)
class Usage