[NI] Minor, use singleton instead of creating anonymous object

This commit is contained in:
Mikhail Zarechenskiy
2019-09-12 17:34:24 +03:00
parent 77577dfa6f
commit de009a2ff2
@@ -26,8 +26,7 @@ object NewCommonSuperTypeCalculator {
// TODO: Bridge for old calls
fun commonSuperType(types: List<UnwrappedType>): UnwrappedType {
val ctx = object : ClassicTypeSystemContext {}
return ctx.commonSuperType(types) as UnwrappedType
return SimpleClassicTypeSystemContext.commonSuperType(types) as UnwrappedType
}
fun TypeSystemCommonSuperTypesContext.commonSuperType(types: List<KotlinTypeMarker>): KotlinTypeMarker {