PSI2IR KT-41284 use getters for open data class property values
'allopen' compiler plug-in can make data classes and their members open, which is a compilation error in usual case, but makes sense for Spring and other frameworks that generate proxy-classes.
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
data class Test(
|
||||
val x: String,
|
||||
val y: String
|
||||
)
|
||||
|
||||
// 7 GETFIELD Test\.x
|
||||
// 7 GETFIELD Test\.y
|
||||
// - get, componentN, copy$default, toString, hashCode, 2 times in equals
|
||||
@@ -0,0 +1,14 @@
|
||||
// This test emulates 'allopen' compiler plugin.
|
||||
|
||||
@Suppress("INCOMPATIBLE_MODIFIERS")
|
||||
open data class Test(
|
||||
open val x: String,
|
||||
open val y: String
|
||||
)
|
||||
|
||||
// 1 GETFIELD Test\.x
|
||||
// 1 GETFIELD Test\.y
|
||||
|
||||
// 6 INVOKEVIRTUAL Test\.getX
|
||||
// 6 INVOKEVIRTUAL Test\.getY
|
||||
// - componentN, copy$default, toString, hashCode, 2 times in equals
|
||||
Reference in New Issue
Block a user