Minor, provide more info when deserializing bad constant value

This commit is contained in:
Alexander Udalov
2018-08-03 17:57:19 +02:00
parent 2ecea55cb1
commit 92e7fe347a
@@ -118,8 +118,10 @@ class AnnotationDeserializer(private val module: ModuleDescriptor, private val n
return if (result.getType(module).isSubtypeOf(expectedType)) {
result
} else {
// This means that an annotation class has been changed incompatibly without recompiling clients
ErrorValue.create("Unexpected argument value")
// This usually means that an annotation class has been changed incompatibly without recompiling clients
ErrorValue.create(
"Unexpected argument value: type ${result.getType(module)} is not a subtype of $expectedType (value.type = ${value.type})"
)
}
}