Optimize/simplify FirJvmTypeMapper.defaultType

This commit is contained in:
Mikhail Glukhikh
2020-12-07 12:54:53 +03:00
parent 3ab5b57594
commit c6a40b2322
@@ -202,7 +202,7 @@ class ConeTypeSystemCommonBackendContextForTypeMapping(
return when (this) {
is ConeTypeParameterLookupTag -> ConeTypeParameterTypeImpl(this, isNullable = false)
is ConeClassLikeLookupTag -> {
val symbol = symbolProvider.getClassLikeSymbolByFqName(classId) as? FirRegularClassSymbol
val symbol = toSymbol(session) as? FirRegularClassSymbol
?: error("Class for $this not found")
symbol.fir.defaultType()
}