Generate static backing fields for properties in object
#KT-4973 Fixed
Original commit: 5412a67d29
This commit is contained in:
@@ -201,9 +201,9 @@ public class IncrementalJpsTestGenerated extends AbstractIncrementalJpsTest {
|
|||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("objectValChanged")
|
@TestMetadata("objectConstantChanged")
|
||||||
public void testObjectValChanged() throws Exception {
|
public void testObjectConstantChanged() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/objectValChanged/");
|
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/objectConstantChanged/");
|
||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
Cleaning output files:
|
||||||
|
out/production/module/test/Object.class
|
||||||
|
End of files
|
||||||
|
Compiling files:
|
||||||
|
src/const.kt
|
||||||
|
End of files
|
||||||
|
Cleaning output files:
|
||||||
|
out/production/module/test/Object.class
|
||||||
|
out/production/module/test/Usage.class
|
||||||
|
End of files
|
||||||
|
Compiling files:
|
||||||
|
src/const.kt
|
||||||
|
src/usage.kt
|
||||||
|
End of files
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
object Object {
|
||||||
|
val CONST = "old"
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
object Object {
|
||||||
|
val CONST = "new"
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
deprecated(Object.CONST + Object.CONST)
|
||||||
|
class Usage
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
Cleaning output files:
|
|
||||||
out/production/module/test/Object.class
|
|
||||||
End of files
|
|
||||||
Compiling files:
|
|
||||||
src/const.kt
|
|
||||||
End of files
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
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"
|
|
||||||
}
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
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"
|
|
||||||
}
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
package test
|
|
||||||
|
|
||||||
fun main(args: Array<String>) {
|
|
||||||
val x = Object.CONST + Object.CONST
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user