Add @JvmRecord annotation and relevant diagnostics

^KT-43677 In Progress
This commit is contained in:
Denis.Zharkov
2020-11-25 12:54:40 +03:00
parent 059e2aab7a
commit 4f5db241ea
13 changed files with 173 additions and 5 deletions
@@ -0,0 +1,34 @@
// !LANGUAGE: +JvmRecordSupport
// SKIP_TXT
@JvmRecord
class <!JVM_RECORD_WITHOUT_PRIMARY_CONSTRUCTOR_PARAMETERS!>A0<!>
@JvmRecord
class <!JVM_RECORD_WITHOUT_PRIMARY_CONSTRUCTOR_PARAMETERS!>A1<!> {
constructor()
}
@JvmRecord
class A2<!JVM_RECORD_WITHOUT_PRIMARY_CONSTRUCTOR_PARAMETERS!>()<!>
@JvmRecord
class A3(<!JVM_RECORD_NOT_VAL_PARAMETER!><!UNUSED_PARAMETER!>name<!>: String<!>)
@JvmRecord
class A4(<!JVM_RECORD_NOT_VAL_PARAMETER!>var name: String<!>)
@JvmRecord
class A5(vararg val name: String, <!JVM_RECORD_NOT_VAL_PARAMETER!><!UNUSED_PARAMETER!>y<!>: Int<!>)
@JvmRecord
class A6(
val x: String,
val y: Int,
vararg val z: Double,
)
fun main() {
<!LOCAL_JVM_RECORD!>@JvmRecord<!>
class Local
}
@@ -0,0 +1,9 @@
// !LANGUAGE: -JvmRecordSupport
// SKIP_TXT
<!UNSUPPORTED_FEATURE!>@JvmRecord<!>
class MyRec(
val x: String,
val y: Int,
vararg val z: Double,
)