Minor. Get rid of redundant var

The lazyness here is redundant since SmartList doesn't make a lot of
harm, but at the same time `var` here leads to another
kotlin/jvm/internal/Ref$ObjectRef instance
This commit is contained in:
Denis Zharkov
2017-09-28 18:58:27 +03:00
parent bca53e6c1c
commit df88926ef8
@@ -291,18 +291,14 @@ object NewKotlinTypeChecker : KotlinTypeChecker {
emptyList()
}
var result: MutableList<SimpleType>? = null
val result: MutableList<SimpleType> = SmartList()
anySupertype(baseType, { false }) {
val current = captureFromArguments(it, CaptureStatus.FOR_SUBTYPING) ?: it
when {
areEqualTypeConstructors(current.constructor, constructor) -> {
if (result == null) {
result = SmartList()
}
result!!.add(current)
result.add(current)
SupertypesPolicy.None
}
current.arguments.isEmpty() -> {
@@ -314,7 +310,7 @@ object NewKotlinTypeChecker : KotlinTypeChecker {
}
}
return result ?: emptyList()
return result
}
private val ClassDescriptor.isCommonFinalClass: Boolean