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
@@ -34,6 +34,8 @@ fun FirElement.render(): String = buildString { this@render.accept(FirRenderer(t
fun ConeKotlinType.render(): String {
return when (this) {
is ConeTypeVariableType -> "TypeVariable(${this.lookupTag.name})"
is ConeDefinitelyNotNullType -> "${original.render()}!"
is ConeKotlinErrorType -> "error: $reason"
is ConeClassErrorType -> "class error: $reason"
is ConeCapturedType -> "captured type: lowerType = ${lowerType?.render()}"
@@ -12,7 +12,7 @@ import org.jetbrains.kotlin.fir.FirSession
import org.jetbrains.kotlin.fir.symbols.ConeCallableSymbol
import org.jetbrains.kotlin.name.Name
class FirResolvedCallableReferenceImpl(
open class FirResolvedCallableReferenceImpl(
session: FirSession,
psi: PsiElement?,
override val name: Name,
@@ -0,0 +1,17 @@
/*
* Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.kotlin.fir.types.impl
import com.intellij.psi.PsiElement
import org.jetbrains.kotlin.fir.FirSession
import org.jetbrains.kotlin.fir.types.FirTypeProjection
object FirTypePlaceholderProjection : FirTypeProjection {
override val psi: PsiElement?
get() = null // TODO
override val session: FirSession
get() = error("ahahahhahah")
}