FIR: make FunctionType class-like, refactor built-ins resolution

This breaks total kotlin resolve test because of incorrect rendering
of ConeClassErrorType (we are trying to read its symbol)
This commit is contained in:
Simon Ogorodnik
2019-02-12 14:04:31 +03:00
committed by Mikhail Glukhikh
parent 3edd82b602
commit 9ebefa3ba6
50 changed files with 144 additions and 126 deletions
@@ -92,7 +92,9 @@ abstract class ConeTypeParameterType : ConeSymbolBasedType() {
}
abstract class ConeFunctionType : ConeKotlinType() {
abstract class ConeFunctionType : ConeClassLikeType() {
abstract override val symbol: ConeClassLikeSymbol
abstract val receiverType: ConeKotlinType?
abstract val parameterTypes: List<ConeKotlinType>
abstract val returnType: ConeKotlinType
@@ -5,6 +5,7 @@
package org.jetbrains.kotlin.fir.types.impl
import org.jetbrains.kotlin.fir.symbols.ConeClassLikeSymbol
import org.jetbrains.kotlin.fir.types.ConeFunctionType
import org.jetbrains.kotlin.fir.types.ConeKotlinType
import org.jetbrains.kotlin.fir.types.ConeKotlinTypeProjection
@@ -12,7 +13,8 @@ import org.jetbrains.kotlin.fir.types.ConeKotlinTypeProjection
class ConeFunctionTypeImpl(
override val receiverType: ConeKotlinType?,
override val parameterTypes: List<ConeKotlinType>,
override val returnType: ConeKotlinType
override val returnType: ConeKotlinType,
override val symbol: ConeClassLikeSymbol
) : ConeFunctionType() {
override val typeArguments: Array<out ConeKotlinTypeProjection>
get() = EMPTY_ARRAY