Fix formatting of RuntimeAssertion.kt
This commit is contained in:
@@ -39,7 +39,8 @@ class RuntimeAssertionInfo(val needNotNullAssertion: Boolean, val message: Strin
|
||||
}
|
||||
|
||||
companion object {
|
||||
@JvmStatic fun create(
|
||||
@JvmStatic
|
||||
fun create(
|
||||
expectedType: KotlinType,
|
||||
expressionType: KotlinType,
|
||||
dataFlowExtras: DataFlowExtras
|
||||
@@ -96,7 +97,12 @@ class RuntimeAssertionsDataFlowExtras(
|
||||
}
|
||||
|
||||
object RuntimeAssertionsTypeChecker : AdditionalTypeChecker {
|
||||
override fun checkType(expression: KtExpression, expressionType: KotlinType, expressionTypeWithSmartCast: KotlinType, c: ResolutionContext<*>) {
|
||||
override fun checkType(
|
||||
expression: KtExpression,
|
||||
expressionType: KotlinType,
|
||||
expressionTypeWithSmartCast: KotlinType,
|
||||
c: ResolutionContext<*>
|
||||
) {
|
||||
if (TypeUtils.noExpectedType(c.expectedType)) return
|
||||
|
||||
val assertionInfo = RuntimeAssertionInfo.create(
|
||||
@@ -177,8 +183,11 @@ object RuntimeAssertionsOnDeclarationBodyChecker {
|
||||
) {
|
||||
if (declaration.typeReference != null || declaration.hasBlockBody()) return
|
||||
|
||||
checkNullabilityAssertion(declaration.bodyExpression ?: return, descriptor.returnType ?: return,
|
||||
bindingTrace)
|
||||
checkNullabilityAssertion(
|
||||
declaration.bodyExpression ?: return,
|
||||
descriptor.returnType ?: return,
|
||||
bindingTrace
|
||||
)
|
||||
}
|
||||
|
||||
private fun checkProperty(
|
||||
@@ -201,8 +210,11 @@ object RuntimeAssertionsOnDeclarationBodyChecker {
|
||||
) {
|
||||
if (declaration.property.typeReference != null || declaration.hasBlockBody()) return
|
||||
|
||||
checkNullabilityAssertion(declaration.bodyExpression ?: return, descriptor.correspondingProperty.type,
|
||||
bindingTrace)
|
||||
checkNullabilityAssertion(
|
||||
declaration.bodyExpression ?: return,
|
||||
descriptor.correspondingProperty.type,
|
||||
bindingTrace
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user