Add compiler diagnostic tests for parcelize checkers

This commit is contained in:
Dmitriy Novozhilov
2021-10-26 11:17:59 +03:00
committed by teamcityserver
parent b84ee64994
commit 40d8451698
16 changed files with 220 additions and 48 deletions
@@ -11,7 +11,7 @@ class A : Parcelable
class B(val firstName: String, val secondName: String) : Parcelable
@Parcelize
class C(val firstName: String, <error descr="[PARCELABLE_CONSTRUCTOR_PARAMETER_SHOULD_BE_VAL_OR_VAR] 'Parcelable' constructor parameter should be 'val' or 'var'">secondName</error>: String) : Parcelable
class C(val firstName: String, <!PARCELABLE_CONSTRUCTOR_PARAMETER_SHOULD_BE_VAL_OR_VAR!>secondName<!>: String) : Parcelable
@Parcelize
class D(val firstName: String, vararg val secondName: String) : Parcelable
@@ -22,7 +22,7 @@ class E(val firstName: String, val secondName: String) : Parcelable {
}
@Parcelize
class <error descr="[PARCELABLE_SHOULD_HAVE_PRIMARY_CONSTRUCTOR] 'Parcelable' should have a primary constructor">F</error> : Parcelable {
class <!PARCELABLE_SHOULD_HAVE_PRIMARY_CONSTRUCTOR!>F<!> : Parcelable {
constructor(a: String) {
println(a)
}