Skip to content

Commit 9f6ebc9

Browse files
committed
Parcelable: Fixes after review
1 parent baa5b8b commit 9f6ebc9

File tree

12 files changed

+131
-37
lines changed

12 files changed

+131
-37
lines changed

compiler/frontend/src/org/jetbrains/kotlin/psi/KtDelegatedSuperTypeEntry.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import com.intellij.lang.ASTNode;
2020
import org.jetbrains.annotations.NotNull;
2121
import org.jetbrains.annotations.Nullable;
22+
import org.jetbrains.kotlin.lexer.KtTokens;
2223
import org.jetbrains.kotlin.psi.stubs.KotlinPlaceHolderStub;
2324
import org.jetbrains.kotlin.psi.stubs.elements.KtStubElementTypes;
2425

@@ -40,4 +41,8 @@ public <R, D> R accept(@NotNull KtVisitor<R, D> visitor, D data) {
4041
public KtExpression getDelegateExpression() {
4142
return findChildByClass(KtExpression.class);
4243
}
44+
45+
public ASTNode getByKeywordNode() {
46+
return getNode().findChildByType(KtTokens.BY_KEYWORD);
47+
}
4348
}

plugins/android-extensions/android-extensions-compiler/src/org/jetbrains/kotlin/android/parcel/ParcelableCodegenExtension.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ class ParcelableCodegenExtension : ExpressionCodegenExtension {
188188
val asmType = codegen.typeMapper.mapType(type)
189189
asmConstructorParameters.append(asmType.descriptor)
190190

191-
val serializer = ParcelSerializer.get(type, asmType, codegen.typeMapper, forceBoxed = false, strict = false)
191+
val serializer = ParcelSerializer.get(type, asmType, codegen.typeMapper)
192192
v.load(1, parcelAsmType)
193193
serializer.readValue(v)
194194
}
@@ -276,12 +276,12 @@ class ParcelableCodegenExtension : ExpressionCodegenExtension {
276276
if (parcelerObject != null) {
277277
val newArrayMethod = parcelerObject.unsubstitutedMemberScope
278278
.getContributedFunctions(Name.identifier("newArray"), NoLookupLocation.WHEN_GET_ALL_DESCRIPTORS)
279-
.filter {
279+
.firstOrNull {
280280
it.typeParameters.isEmpty()
281281
&& it.kind == CallableMemberDescriptor.Kind.DECLARATION
282282
&& (it.valueParameters.size == 1 && KotlinBuiltIns.isInt(it.valueParameters[0].type))
283283
&& !((it.containingDeclaration as? ClassDescriptor)?.defaultType?.isParceler() ?: true)
284-
}.firstOrNull()
284+
}
285285

286286
if (newArrayMethod != null) {
287287
val containerAsmType = codegen.typeMapper.mapType(parcelableClass.defaultType)

plugins/android-extensions/android-extensions-compiler/src/org/jetbrains/kotlin/android/parcel/ParcelableDeclarationChecker.kt

Lines changed: 31 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
package org.jetbrains.kotlin.android.parcel
1818

1919
import org.jetbrains.kotlin.android.parcel.serializers.ParcelSerializer
20+
import org.jetbrains.kotlin.android.parcel.serializers.isParcelable
2021
import org.jetbrains.kotlin.android.synthetic.diagnostic.ErrorsAndroid
2122
import org.jetbrains.kotlin.codegen.ClassBuilderMode
2223
import org.jetbrains.kotlin.codegen.state.IncompatibleClassTracker
@@ -65,7 +66,7 @@ class ParcelableDeclarationChecker : SimpleDeclarationChecker {
6566
val containingClass = descriptor.containingDeclaration as? ClassDescriptor
6667
val ktProperty = declaration as? KtProperty
6768
if (containingClass != null && ktProperty != null) {
68-
checkParcelableClassProperty(descriptor, containingClass, ktProperty, diagnosticHolder)
69+
checkParcelableClassProperty(descriptor, containingClass, ktProperty, diagnosticHolder, bindingContext)
6970
}
7071
}
7172
}
@@ -79,32 +80,31 @@ class ParcelableDeclarationChecker : SimpleDeclarationChecker {
7980
) {
8081
if (!containingClass.isMagicParcelable) return
8182

82-
if (method.isWriteToParcel()) {
83+
if (method.isWriteToParcel() && declaration.hasModifier(KtTokens.OVERRIDE_KEYWORD)) {
8384
val reportElement = declaration.modifierList?.getModifier(KtTokens.OVERRIDE_KEYWORD) ?: declaration.nameIdentifier ?: declaration
84-
diagnosticHolder.report(ErrorsAndroid.OVERRIDING_WRITE_TO_PARCEL_IS_FORBIDDEN.on(reportElement))
85+
diagnosticHolder.report(ErrorsAndroid.OVERRIDING_WRITE_TO_PARCEL_IS_NOT_ALLOWED.on(reportElement))
8586
}
8687
}
8788

8889
private fun checkParcelableClassProperty(
8990
property: PropertyDescriptor,
9091
containingClass: ClassDescriptor,
9192
declaration: KtProperty,
92-
diagnosticHolder: DiagnosticSink
93+
diagnosticHolder: DiagnosticSink,
94+
bindingContext: BindingContext
9395
) {
94-
if (containingClass.isMagicParcelable) {
95-
// Do not report on calculated properties
96-
if (declaration.getter?.hasBody() == true) return
97-
98-
if (!property.annotations.hasAnnotation(TRANSIENT_FQNAME)) {
99-
diagnosticHolder.report(ErrorsAndroid.PROPERTY_WONT_BE_SERIALIZED.on(declaration.nameIdentifier ?: declaration))
100-
}
96+
if (containingClass.isMagicParcelable
97+
&& declaration.hasDelegate() || bindingContext[BindingContext.BACKING_FIELD_REQUIRED, property] == true
98+
&& !property.annotations.hasAnnotation(TRANSIENT_FQNAME)
99+
) {
100+
diagnosticHolder.report(ErrorsAndroid.PROPERTY_WONT_BE_SERIALIZED.on(declaration.nameIdentifier ?: declaration))
101101
}
102102

103103
// @JvmName is not applicable to property so we can check just the descriptor name
104104
if (property.name.asString() == "CREATOR" && property.findJvmFieldAnnotation() != null && containingClass.isCompanionObject) {
105105
val outerClass = containingClass.containingDeclaration as? ClassDescriptor
106106
if (outerClass != null && outerClass.isMagicParcelable) {
107-
diagnosticHolder.report(ErrorsAndroid.CREATOR_DEFINITION_IS_FORBIDDEN.on(declaration.nameIdentifier ?: declaration))
107+
diagnosticHolder.report(ErrorsAndroid.CREATOR_DEFINITION_IS_NOT_ALLOWED.on(declaration.nameIdentifier ?: declaration))
108108
}
109109
}
110110
}
@@ -117,12 +117,18 @@ class ParcelableDeclarationChecker : SimpleDeclarationChecker {
117117
) {
118118
if (!descriptor.isMagicParcelable) return
119119

120-
if (declaration !is KtClass || (declaration.isAnnotation() || declaration.isInterface() || declaration.isEnum())) {
120+
if (declaration !is KtClass || (declaration.isAnnotation() || declaration.isInterface())) {
121121
val reportElement = (declaration as? KtClassOrObject)?.nameIdentifier ?: declaration
122122
diagnosticHolder.report(ErrorsAndroid.PARCELABLE_SHOULD_BE_CLASS.on(reportElement))
123123
return
124124
}
125125

126+
if (declaration.isEnum()) {
127+
val reportElement = (declaration as? KtClass)?.nameIdentifier ?: declaration
128+
diagnosticHolder.report(ErrorsAndroid.PARCELABLE_SHOULD_BE_CLASS.on(reportElement))
129+
return
130+
}
131+
126132
val sealedOrAbstract = declaration.modifierList?.let { it.getModifier(KtTokens.ABSTRACT_KEYWORD) ?: it.getModifier(KtTokens.SEALED_KEYWORD) }
127133
if (sealedOrAbstract != null) {
128134
diagnosticHolder.report(ErrorsAndroid.PARCELABLE_SHOULD_BE_INSTANTIABLE.on(sealedOrAbstract))
@@ -142,9 +148,21 @@ class ParcelableDeclarationChecker : SimpleDeclarationChecker {
142148
diagnosticHolder.report(ErrorsAndroid.NO_PARCELABLE_SUPERTYPE.on(declaration.nameIdentifier ?: declaration))
143149
}
144150

151+
for (supertypeEntry in declaration.superTypeListEntries) {
152+
supertypeEntry as? KtDelegatedSuperTypeEntry ?: continue
153+
val delegateExpression = supertypeEntry.delegateExpression ?: continue
154+
val type = bindingContext[BindingContext.TYPE, supertypeEntry.typeReference] ?: continue
155+
if (type.isParcelable()) {
156+
val reportElement = supertypeEntry.byKeywordNode?.psi ?: delegateExpression
157+
diagnosticHolder.report(ErrorsAndroid.PARCELABLE_DELEGATE_IS_NOT_ALLOWED.on(reportElement))
158+
}
159+
}
160+
145161
val primaryConstructor = declaration.primaryConstructor
146162
if (primaryConstructor == null && declaration.secondaryConstructors.isNotEmpty()) {
147163
diagnosticHolder.report(ErrorsAndroid.PARCELABLE_SHOULD_HAVE_PRIMARY_CONSTRUCTOR.on(declaration.nameIdentifier ?: declaration))
164+
} else if (primaryConstructor != null && primaryConstructor.valueParameters.isEmpty()) {
165+
diagnosticHolder.report(ErrorsAndroid.PARCELABLE_PRIMARY_CONSTRUCTOR_IS_EMPTY.on(declaration.nameIdentifier ?: declaration))
148166
}
149167

150168
val typeMapper = KotlinTypeMapper(

plugins/android-extensions/android-extensions-compiler/src/org/jetbrains/kotlin/android/parcel/serializers/ParcelSerializer.kt

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,6 @@ interface ParcelSerializer {
225225
private fun KotlinType.isException() = matchesFqNameWithSupertypes("java.lang.Exception")
226226
private fun KotlinType.isIBinder() = matchesFqNameWithSupertypes("android.os.IBinder")
227227
private fun KotlinType.isIInterface() = matchesFqNameWithSupertypes("android.os.IInterface")
228-
private fun KotlinType.isParcelable() = matchesFqNameWithSupertypes("android.os.Parcelable")
229228
private fun KotlinType.isCharSequence() = matchesFqName("kotlin.CharSequence") || matchesFqName("java.lang.CharSequence")
230229

231230
private fun KotlinType.isNamedObject(): Boolean {
@@ -253,17 +252,19 @@ interface ParcelSerializer {
253252
"Ljava/lang/Double;" -> true
254253
else -> false
255254
}
255+
}
256+
}
256257

257-
private fun KotlinType.matchesFqNameWithSupertypes(fqName: String): Boolean {
258-
if (this.matchesFqName(fqName)) {
259-
return true
260-
}
258+
internal fun KotlinType.isParcelable() = matchesFqNameWithSupertypes("android.os.Parcelable")
261259

262-
return TypeUtils.getAllSupertypes(this).any { it.matchesFqName(fqName) }
263-
}
260+
private fun KotlinType.matchesFqName(fqName: String): Boolean {
261+
return this.constructor.declarationDescriptor?.fqNameSafe?.asString() == fqName
262+
}
264263

265-
private fun KotlinType.matchesFqName(fqName: String): Boolean {
266-
return this.constructor.declarationDescriptor?.fqNameSafe?.asString() == fqName
267-
}
264+
private fun KotlinType.matchesFqNameWithSupertypes(fqName: String): Boolean {
265+
if (this.matchesFqName(fqName)) {
266+
return true
268267
}
268+
269+
return TypeUtils.getAllSupertypes(this).any { it.matchesFqName(fqName) }
269270
}

plugins/android-extensions/android-extensions-compiler/src/org/jetbrains/kotlin/android/synthetic/diagnostic/DefaultErrorMessagesAndroid.kt

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@ class DefaultErrorMessagesAndroid : DefaultErrorMessages.Extension {
4343
MAP.put(ErrorsAndroid.PARCELABLE_SHOULD_BE_CLASS,
4444
"'Parcelable' should be a class")
4545

46+
MAP.put(ErrorsAndroid.PARCELABLE_DELEGATE_IS_NOT_ALLOWED,
47+
"Delegating 'Parcelable' is now allowed")
48+
49+
MAP.put(ErrorsAndroid.PARCELABLE_SHOULD_NOT_BE_ENUM_CLASS,
50+
"'Parcelable' should not be a 'enum class'")
51+
4652
MAP.put(ErrorsAndroid.PARCELABLE_SHOULD_BE_INSTANTIABLE,
4753
"'Parcelable' should not be a 'sealed' or 'abstract' class")
4854

@@ -58,20 +64,23 @@ class DefaultErrorMessagesAndroid : DefaultErrorMessages.Extension {
5864
MAP.put(ErrorsAndroid.PARCELABLE_SHOULD_HAVE_PRIMARY_CONSTRUCTOR,
5965
"'Parcelable' should have a primary constructor")
6066

67+
MAP.put(ErrorsAndroid.PARCELABLE_PRIMARY_CONSTRUCTOR_IS_EMPTY,
68+
"The primary constructor is empty, no data will be serialized to 'Parcel'")
69+
6170
MAP.put(ErrorsAndroid.PARCELABLE_CONSTRUCTOR_PARAMETER_SHOULD_BE_VAL_OR_VAR,
6271
"'Parcelable' constructor parameter should be 'val' or 'var'")
6372

6473
MAP.put(ErrorsAndroid.PROPERTY_WONT_BE_SERIALIZED,
6574
"Property would not be serialized into a 'Parcel'. Add '@Transient' annotation to it")
6675

67-
MAP.put(ErrorsAndroid.OVERRIDING_WRITE_TO_PARCEL_IS_FORBIDDEN,
68-
"Overriding 'writeToParcel' is forbidden. Use 'Parceler' companion object instead.")
76+
MAP.put(ErrorsAndroid.OVERRIDING_WRITE_TO_PARCEL_IS_NOT_ALLOWED,
77+
"Overriding 'writeToParcel' is not allowed. Use 'Parceler' companion object instead.")
6978

70-
MAP.put(ErrorsAndroid.CREATOR_DEFINITION_IS_FORBIDDEN,
71-
"'CREATOR' definition is forbidden. Use 'Parceler' companion object instead.")
79+
MAP.put(ErrorsAndroid.CREATOR_DEFINITION_IS_NOT_ALLOWED,
80+
"'CREATOR' definition is not allowed. Use 'Parceler' companion object instead.")
7281

7382
MAP.put(ErrorsAndroid.PARCELABLE_TYPE_NOT_SUPPORTED,
74-
"Type is not supported by 'Parcelable'. " +
83+
"Type is not directly supported by 'MagicParcelable'. " +
7584
"Annotate the parameter type with '@RawValue' if you want it to be serialized using 'writeValue()'")
7685
}
7786
}

plugins/android-extensions/android-extensions-compiler/src/org/jetbrains/kotlin/android/synthetic/diagnostic/ErrorsAndroid.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,18 @@ public interface ErrorsAndroid {
3232
DiagnosticFactory0<KtExpression> UNSAFE_CALL_ON_PARTIALLY_DEFINED_RESOURCE = DiagnosticFactory0.create(WARNING);
3333

3434
DiagnosticFactory0<PsiElement> PARCELABLE_SHOULD_BE_CLASS = DiagnosticFactory0.create(ERROR);
35+
DiagnosticFactory0<PsiElement> PARCELABLE_DELEGATE_IS_NOT_ALLOWED = DiagnosticFactory0.create(ERROR);
36+
DiagnosticFactory0<PsiElement> PARCELABLE_SHOULD_NOT_BE_ENUM_CLASS = DiagnosticFactory0.create(ERROR);
3537
DiagnosticFactory0<PsiElement> PARCELABLE_SHOULD_BE_INSTANTIABLE = DiagnosticFactory0.create(ERROR);
3638
DiagnosticFactory0<PsiElement> PARCELABLE_CANT_BE_INNER_CLASS = DiagnosticFactory0.create(ERROR);
3739
DiagnosticFactory0<PsiElement> PARCELABLE_CANT_BE_LOCAL_CLASS = DiagnosticFactory0.create(ERROR);
3840
DiagnosticFactory0<PsiElement> NO_PARCELABLE_SUPERTYPE = DiagnosticFactory0.create(ERROR);
3941
DiagnosticFactory0<PsiElement> PARCELABLE_SHOULD_HAVE_PRIMARY_CONSTRUCTOR = DiagnosticFactory0.create(ERROR);
42+
DiagnosticFactory0<PsiElement> PARCELABLE_PRIMARY_CONSTRUCTOR_IS_EMPTY = DiagnosticFactory0.create(WARNING);
4043
DiagnosticFactory0<PsiElement> PARCELABLE_CONSTRUCTOR_PARAMETER_SHOULD_BE_VAL_OR_VAR = DiagnosticFactory0.create(ERROR);
4144
DiagnosticFactory0<PsiElement> PROPERTY_WONT_BE_SERIALIZED = DiagnosticFactory0.create(WARNING);
42-
DiagnosticFactory0<PsiElement> OVERRIDING_WRITE_TO_PARCEL_IS_FORBIDDEN = DiagnosticFactory0.create(ERROR);
43-
DiagnosticFactory0<PsiElement> CREATOR_DEFINITION_IS_FORBIDDEN = DiagnosticFactory0.create(ERROR);
45+
DiagnosticFactory0<PsiElement> OVERRIDING_WRITE_TO_PARCEL_IS_NOT_ALLOWED = DiagnosticFactory0.create(ERROR);
46+
DiagnosticFactory0<PsiElement> CREATOR_DEFINITION_IS_NOT_ALLOWED = DiagnosticFactory0.create(ERROR);
4447
DiagnosticFactory0<PsiElement> PARCELABLE_TYPE_NOT_SUPPORTED = DiagnosticFactory0.create(ERROR);
4548

4649
@SuppressWarnings("UnusedDeclaration")

plugins/android-extensions/android-extensions-idea/testData/android/parcel/checker/customCreator.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import android.os.Parcel
88
class A(val a: String) : Parcelable {
99
companion object {
1010
@JvmField
11-
val <error descr="[CREATOR_DEFINITION_IS_FORBIDDEN] 'CREATOR' definition is forbidden. Use 'Parceler' nested object instead.">CREATOR</error> = object : Parcelable.Creator<A> {
11+
val <error descr="[CREATOR_DEFINITION_IS_NOT_ALLOWED] 'CREATOR' definition is not allowed. Use 'Parceler' companion object instead.">CREATOR</error> = object : Parcelable.Creator<A> {
1212
override fun createFromParcel(source: Parcel): A = A("")
1313
override fun newArray(size: Int) = arrayOfNulls<A>(size)
1414
}

plugins/android-extensions/android-extensions-idea/testData/android/parcel/checker/customWriteToParcel.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@ import android.os.Parcel
66

77
@MagicParcel
88
class A(val a: String) : Parcelable {
9-
<error descr="[OVERRIDING_WRITE_TO_PARCEL_IS_FORBIDDEN] Overriding 'writeToParcel' is forbidden. Use 'Parceler' nested object instead.">override</error> fun writeToParcel(p: Parcel?, flags: Int) {}
9+
<error descr="[OVERRIDING_WRITE_TO_PARCEL_IS_NOT_ALLOWED] Overriding 'writeToParcel' is not allowed. Use 'Parceler' companion object instead.">override</error> fun writeToParcel(p: Parcel?, flags: Int) {}
1010
override fun describeContents() = 0
1111
}
1212

1313
@MagicParcel
1414
class B(val a: String) : Parcelable {
15-
<error descr="[OVERRIDING_WRITE_TO_PARCEL_IS_FORBIDDEN] Overriding 'writeToParcel' is forbidden. Use 'Parceler' nested object instead.">override</error> fun writeToParcel(p: Parcel?, flags: Int) {}
15+
<error descr="[OVERRIDING_WRITE_TO_PARCEL_IS_NOT_ALLOWED] Overriding 'writeToParcel' is not allowed. Use 'Parceler' companion object instead.">override</error> fun writeToParcel(p: Parcel?, flags: Int) {}
1616
}
1717

1818
@MagicParcel
1919
class C(val a: String) : Parcelable {
20-
<error descr="[OVERRIDING_WRITE_TO_PARCEL_IS_FORBIDDEN] Overriding 'writeToParcel' is forbidden. Use 'Parceler' nested object instead.">override</error> fun writeToParcel(p: Parcel, flags: Int) {}
20+
<error descr="[OVERRIDING_WRITE_TO_PARCEL_IS_NOT_ALLOWED] Overriding 'writeToParcel' is not allowed. Use 'Parceler' companion object instead.">override</error> fun writeToParcel(p: Parcel, flags: Int) {}
2121
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package test
2+
3+
import kotlinx.android.parcel.MagicParcel
4+
import android.os.Parcelable
5+
import android.os.Parcel
6+
7+
open class Delegate : Parcelable {
8+
override fun writeToParcel(dest: Parcel?, flags: Int) {}
9+
override fun describeContents() = 0
10+
}
11+
12+
@MagicParcel
13+
class Test : Parcelable <error descr="[PARCELABLE_DELEGATE_IS_NOT_ALLOWED] Delegating 'Parcelable' is now allowed">by</error> Delegate()
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
package test
2+
3+
import kotlinx.android.parcel.MagicParcel
4+
import android.os.Parcelable
5+
6+
@MagicParcel
7+
class User : Parcelable
8+
9+
@MagicParcel
10+
class <warning descr="[PARCELABLE_PRIMARY_CONSTRUCTOR_IS_EMPTY] The primary constructor is empty, no data will be serialized to 'Parcel'">User2</warning>() : Parcelable
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package test
2+
3+
import kotlinx.android.parcel.MagicParcel
4+
import kotlinx.android.parcel.RawValue
5+
import android.os.Parcelable
6+
7+
@MagicParcel
8+
class User(
9+
val a: String,
10+
val b: <error descr="[PARCELABLE_TYPE_NOT_SUPPORTED] Type is not directly supported by 'MagicParcelable'. Annotate the parameter type with '@RawValue' if you want it to be serialized using 'writeValue()'">Any</error>,
11+
val c: <error descr="[PARCELABLE_TYPE_NOT_SUPPORTED] Type is not directly supported by 'MagicParcelable'. Annotate the parameter type with '@RawValue' if you want it to be serialized using 'writeValue()'">Any?</error>,
12+
val d: <error descr="[PARCELABLE_TYPE_NOT_SUPPORTED] Type is not directly supported by 'MagicParcelable'. Annotate the parameter type with '@RawValue' if you want it to be serialized using 'writeValue()'">Map<Any, String></error>,
13+
val e: @RawValue Any?,
14+
val f: @RawValue Map<String, Any>,
15+
val g: Map<String, @RawValue Any>,
16+
val h: Map<@RawValue Any, List<@RawValue Any>>
17+
) : Parcelable

plugins/android-extensions/android-extensions-idea/tests/org/jetbrains/kotlin/android/ParcelCheckerTestGenerated.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,18 @@ public void testCustomWriteToParcel() throws Exception {
5454
doTest(fileName);
5555
}
5656

57+
@TestMetadata("delegate.kt")
58+
public void testDelegate() throws Exception {
59+
String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/parcel/checker/delegate.kt");
60+
doTest(fileName);
61+
}
62+
63+
@TestMetadata("emptyPrimaryConstructor.kt")
64+
public void testEmptyPrimaryConstructor() throws Exception {
65+
String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/parcel/checker/emptyPrimaryConstructor.kt");
66+
doTest(fileName);
67+
}
68+
5769
@TestMetadata("modality.kt")
5870
public void testModality() throws Exception {
5971
String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/parcel/checker/modality.kt");
@@ -78,6 +90,12 @@ public void testSimple() throws Exception {
7890
doTest(fileName);
7991
}
8092

93+
@TestMetadata("unsupportedType.kt")
94+
public void testUnsupportedType() throws Exception {
95+
String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/parcel/checker/unsupportedType.kt");
96+
doTest(fileName);
97+
}
98+
8199
@TestMetadata("withoutParcelableSupertype.kt")
82100
public void testWithoutParcelableSupertype() throws Exception {
83101
String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/parcel/checker/withoutParcelableSupertype.kt");

0 commit comments

Comments
 (0)