FIR: Refactor nested scope, fix super-type resolving jump context

#KT-24017 Fixed
This commit is contained in:
Simon Ogorodnik
2018-03-20 20:55:11 +03:00
committed by Mikhail Glukhikh
parent f82ad6ac20
commit bc9175c4e8
10 changed files with 114 additions and 52 deletions
@@ -6,7 +6,6 @@
package org.jetbrains.kotlin.fir.types
import org.jetbrains.kotlin.fir.visitors.FirVisitor
import org.jetbrains.kotlin.types.KotlinType
interface FirResolvedType : FirTypeWithNullability {
val type: ConeKotlinType
@@ -15,4 +14,5 @@ interface FirResolvedType : FirTypeWithNullability {
visitor.visitResolvedType(this, data)
}
inline fun <reified T> FirType.coneTypeUnsafe() = (this as FirResolvedType).type as T
inline fun <reified T : ConeKotlinType> FirType.coneTypeUnsafe() = (this as FirResolvedType).type as T
inline fun <reified T : ConeKotlinType> FirType.coneTypeSafe() = (this as FirResolvedType).type as? T