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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user