Cleanup: apply "lift out..." inspection (+ some others)

This commit is contained in:
Mikhail Glukhikh
2017-06-28 14:30:52 +03:00
committed by Mikhail Glukhikh
parent 0c41ceea9d
commit 9c06739594
52 changed files with 294 additions and 311 deletions
@@ -123,12 +123,12 @@ class AnnotationDeserializer(private val module: ModuleDescriptor, private val n
else -> error("Unsupported annotation argument type: ${value.type} (expected $expectedType)")
}
if (result.type.isSubtypeOf(expectedType)) {
return result
return if (result.type.isSubtypeOf(expectedType)) {
result
}
else {
// This means that an annotation class has been changed incompatibly without recompiling clients
return factory.createErrorValue("Unexpected argument value")
factory.createErrorValue("Unexpected argument value")
}
}