FIR rename: isNullable -> isMarkedNullable
This commit is contained in:
@@ -53,7 +53,7 @@ class JavaSymbolProvider(
|
||||
session = session,
|
||||
psi = null,
|
||||
type = ConeClassTypeImpl(FirClassSymbol(classId!!), emptyArray()),
|
||||
isNullable = true,
|
||||
isMarkedNullable = true,
|
||||
annotations = emptyList()
|
||||
)
|
||||
).apply {
|
||||
@@ -102,7 +102,7 @@ class JavaSymbolProvider(
|
||||
}
|
||||
return FirResolvedTypeImpl(
|
||||
session, psi = null, type = coneType,
|
||||
isNullable = false, annotations = annotations.map { it.toFirAnnotationCall() }
|
||||
isMarkedNullable = false, annotations = annotations.map { it.toFirAnnotationCall() }
|
||||
)
|
||||
}
|
||||
|
||||
@@ -110,7 +110,7 @@ class JavaSymbolProvider(
|
||||
if (this is JavaClassifierType) return toFirResolvedType()
|
||||
return FirResolvedTypeImpl(
|
||||
session, psi = null, type = ConeClassErrorType("Unexpected JavaType: $this"),
|
||||
isNullable = false, annotations = emptyList()
|
||||
isMarkedNullable = false, annotations = emptyList()
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -121,7 +121,7 @@ open class FirTypeResolveTransformer(
|
||||
return FirResolvedFunctionTypeImpl(
|
||||
functionType.psi,
|
||||
functionType.session,
|
||||
functionType.isNullable,
|
||||
functionType.isMarkedNullable,
|
||||
functionType.annotations as MutableList<FirAnnotationCall>,
|
||||
functionType.receiverType,
|
||||
functionType.valueParameters as MutableList<FirValueParameter>,
|
||||
|
||||
+1
-1
@@ -142,7 +142,7 @@ fun FirType.withReplacedConeType(newType: ConeKotlinType?): FirResolvedType {
|
||||
|
||||
return FirResolvedTypeImpl(
|
||||
session, psi, newType,
|
||||
isNullable,
|
||||
isMarkedNullable,
|
||||
annotations
|
||||
)
|
||||
|
||||
|
||||
@@ -583,7 +583,7 @@ class FirRenderer(builder: StringBuilder) : FirVisitorVoid() {
|
||||
}
|
||||
|
||||
override fun visitTypeWithNullability(typeWithNullability: FirTypeWithNullability) {
|
||||
if (typeWithNullability.isNullable) {
|
||||
if (typeWithNullability.isMarkedNullable) {
|
||||
print("?")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ package org.jetbrains.kotlin.fir.types
|
||||
import org.jetbrains.kotlin.fir.visitors.FirVisitor
|
||||
|
||||
interface FirTypeWithNullability : FirType {
|
||||
val isNullable: Boolean
|
||||
val isMarkedNullable: Boolean
|
||||
|
||||
override fun <R, D> accept(visitor: FirVisitor<R, D>, data: D): R =
|
||||
visitor.visitTypeWithNullability(this, data)
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ import org.jetbrains.kotlin.fir.visitors.FirTransformer
|
||||
abstract class FirAbstractAnnotatedType(
|
||||
final override val session: FirSession,
|
||||
final override val psi: PsiElement?,
|
||||
final override val isNullable: Boolean
|
||||
final override val isMarkedNullable: Boolean
|
||||
) : FirTypeWithNullability {
|
||||
override val annotations = mutableListOf<FirAnnotationCall>()
|
||||
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ import org.jetbrains.kotlin.fir.visitors.FirTransformer
|
||||
class FirResolvedFunctionTypeImpl(
|
||||
override val psi: PsiElement?,
|
||||
override val session: FirSession,
|
||||
override val isNullable: Boolean,
|
||||
override val isMarkedNullable: Boolean,
|
||||
override val annotations: MutableList<FirAnnotationCall>,
|
||||
override var receiverType: FirType?,
|
||||
override val valueParameters: MutableList<FirValueParameter>,
|
||||
|
||||
@@ -15,6 +15,6 @@ class FirResolvedTypeImpl(
|
||||
override val session: FirSession,
|
||||
override val psi: PsiElement?,
|
||||
override val type: ConeKotlinType,
|
||||
override val isNullable: Boolean,
|
||||
override val isMarkedNullable: Boolean,
|
||||
override val annotations: List<FirAnnotationCall>
|
||||
) : FirResolvedType
|
||||
Reference in New Issue
Block a user