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