Expand ConeTypeContext, implement FIR type inference & related checkers

This commit is contained in:
Simon Ogorodnik
2019-03-19 16:49:37 +03:00
committed by Mikhail Glukhikh
parent f1eb66819b
commit 1dae135840
37 changed files with 1784 additions and 188 deletions
@@ -55,6 +55,7 @@ fun ConeKotlinType.toIrType(session: FirSession, declarationStorage: Fir2IrDecla
upperBound.toIrType(session, declarationStorage)
}
is ConeCapturedType -> TODO()
is ConeDefinitelyNotNullType -> TODO()
}
}
@@ -102,7 +103,7 @@ fun FirReference.toSymbol(declarationStorage: Fir2IrDeclarationStorage): IrSymbo
fun FirNamedReference.toSymbol(declarationStorage: Fir2IrDeclarationStorage): IrSymbol? {
if (this is FirResolvedCallableReference) {
when (val callableSymbol = this.callableSymbol) {
when (val callableSymbol = this.coneSymbol) {
is FirFunctionSymbol -> return callableSymbol.toFunctionSymbol(declarationStorage)
is FirPropertySymbol -> return callableSymbol.toPropertySymbol(declarationStorage)
is FirVariableSymbol -> return callableSymbol.toValueSymbol(declarationStorage)