From de009a2ff25b8fad775ac03ddda07f8e7333b690 Mon Sep 17 00:00:00 2001 From: Mikhail Zarechenskiy Date: Thu, 12 Sep 2019 17:34:24 +0300 Subject: [PATCH] [NI] Minor, use singleton instead of creating anonymous object --- .../kotlin/resolve/calls/NewCommonSuperTypeCalculator.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/NewCommonSuperTypeCalculator.kt b/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/NewCommonSuperTypeCalculator.kt index 9dd627bec20..708b0ae37c2 100644 --- a/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/NewCommonSuperTypeCalculator.kt +++ b/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/NewCommonSuperTypeCalculator.kt @@ -26,8 +26,7 @@ object NewCommonSuperTypeCalculator { // TODO: Bridge for old calls fun commonSuperType(types: List): UnwrappedType { - val ctx = object : ClassicTypeSystemContext {} - return ctx.commonSuperType(types) as UnwrappedType + return SimpleClassicTypeSystemContext.commonSuperType(types) as UnwrappedType } fun TypeSystemCommonSuperTypesContext.commonSuperType(types: List): KotlinTypeMarker {