K2: Added test for data class metadata

#KT-57622 Fixed
This commit is contained in:
Pavel Kunyavskiy
2023-04-18 14:36:46 +02:00
committed by Space Team
parent f48142a6e6
commit f67f8c393b
20 changed files with 146 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
// MUTED_WHEN: K1
package test
data class DataClass(
val intProp: Int,
val stringProp: String
) {
val nonConstructorProp: Int = 0
}
data object DataObject
@@ -0,0 +1,16 @@
data class DataClass constructor(intProp: Int, stringProp: String) {
val intProp: Int
val nonConstructorProp: Int = 0
val stringProp: String
operator fun component1(): Int
operator fun component2(): String
fun copy(intProp: Int = ..., stringProp: String = ...): DataClass
override fun equals(other: Any?): Boolean
override fun hashCode(): Int
override fun toString(): String
}
data object DataObject {
override fun equals(other: Any?): Boolean
override fun hashCode(): Int
override fun toString(): String
}