Analysis API: rename KtCallableSymbol.type -> returnType

This commit is contained in:
Ilya Kirillov
2021-11-19 18:56:03 +01:00
parent 9d6da14847
commit 1d1f5ace8f
112 changed files with 436 additions and 436 deletions
@@ -33,7 +33,7 @@ internal class KtFe10DescAnonymousFunctionSymbol(
override val hasStableParameterNames: Boolean
get() = withValidityAssertion { descriptor.ktHasStableParameterNames }
override val type: KtType
override val returnType: KtType
get() = withValidityAssertion { descriptor.returnTypeOrNothing.toKtType(analysisContext) }
override val receiverType: KtType?
@@ -35,7 +35,7 @@ internal class KtFe10DescConstructorSymbol(
override val hasStableParameterNames: Boolean
get() = withValidityAssertion { descriptor.ktHasStableParameterNames }
override val type: KtType
override val returnType: KtType
get() = withValidityAssertion { descriptor.returnType.toKtType(analysisContext) }
override val typeParameters: List<KtTypeParameterSymbol>
@@ -55,7 +55,7 @@ class KtFe10DescDefaultPropertyGetterSymbol(
override val callableIdIfNonLocal: CallableId?
get() = withValidityAssertion { propertyDescriptor.getterCallableIdIfNotLocal }
override val type: KtType
override val returnType: KtType
get() = withValidityAssertion { propertyDescriptor.type.toKtType(analysisContext) }
override val origin: KtSymbolOrigin
@@ -56,7 +56,7 @@ class KtFe10DescDefaultPropertySetterSymbol(
override val callableIdIfNonLocal: CallableId?
get() = withValidityAssertion { propertyDescriptor.setterCallableIdIfNotLocal }
override val type: KtType
override val returnType: KtType
get() = withValidityAssertion { analysisContext.builtIns.unitType.toKtType(analysisContext) }
override val origin: KtSymbolOrigin
@@ -96,7 +96,7 @@ class KtFe10DescDefaultPropertySetterSymbol(
override val name: Name
get() = withValidityAssertion { Name.identifier("value") }
override val type: KtType
override val returnType: KtType
get() = withValidityAssertion { propertyDescriptor.type.toKtType(analysisContext) }
override val origin: KtSymbolOrigin
@@ -41,7 +41,7 @@ internal class KtFe10DescEnumEntrySymbol(
)
}
override val type: KtType
override val returnType: KtType
get() = withValidityAssertion { enumDescriptor.defaultType.toKtType(analysisContext) }
override val name: Name
@@ -65,7 +65,7 @@ internal class KtFe10DescFunctionSymbol(
override val callableIdIfNonLocal: CallableId?
get() = withValidityAssertion { descriptor.callableIdIfNotLocal }
override val type: KtType
override val returnType: KtType
get() = withValidityAssertion { descriptor.returnTypeOrNothing.toKtType(analysisContext) }
override val receiverType: KtType?
@@ -36,7 +36,7 @@ internal class KtFe10DescJavaFieldSymbol(
override val callableIdIfNonLocal: CallableId?
get() = withValidityAssertion { descriptor.callableIdIfNotLocal }
override val type: KtType
override val returnType: KtType
get() = withValidityAssertion { descriptor.returnType.toKtType(analysisContext) }
override fun createPointer(): KtSymbolPointer<KtJavaFieldSymbol> = withValidityAssertion {
@@ -89,7 +89,7 @@ internal class KtFe10DescKotlinPropertySymbol(
return KtFe10DescPropertySetterSymbol(setter, analysisContext)
}
override val type: KtType
override val returnType: KtType
get() = withValidityAssertion { descriptor.type.toKtType(analysisContext) }
override val receiverType: KtType?
@@ -28,7 +28,7 @@ internal class KtFe10DescLocalVariableSymbol(
override val isVal: Boolean
get() = withValidityAssertion { !descriptor.isVar }
override val type: KtType
override val returnType: KtType
get() = withValidityAssertion { descriptor.type.toKtType(analysisContext) }
override val symbolKind: KtSymbolKind
@@ -44,7 +44,7 @@ internal class KtFe10DescPropertyGetterSymbol(
override val callableIdIfNonLocal: CallableId?
get() = withValidityAssertion { descriptor.correspondingProperty.getterCallableIdIfNotLocal }
override val type: KtType
override val returnType: KtType
get() = withValidityAssertion { descriptor.returnTypeOrNothing.toKtType(analysisContext) }
override val receiverType: KtType?
@@ -22,7 +22,7 @@ internal class KtFe10DescPropertySetterSymbol(
override val descriptor: PropertySetterDescriptor,
override val analysisContext: Fe10AnalysisContext
) : KtPropertySetterSymbol(), KtFe10DescMemberSymbol<PropertySetterDescriptor> {
override val type: KtType
override val returnType: KtType
get() = withValidityAssertion { analysisContext.builtIns.unitType.toKtType(analysisContext) }
override val isDefault: Boolean
@@ -41,7 +41,7 @@ internal class KtFe10DescSamConstructorSymbol(
override val callableIdIfNonLocal: CallableId?
get() = withValidityAssertion { expandedDescriptor.callableIdIfNotLocal }
override val type: KtType
override val returnType: KtType
get() = withValidityAssertion { descriptor.returnTypeOrNothing.toKtType(analysisContext) }
override val receiverType: KtType?
@@ -35,7 +35,7 @@ internal class KtFe10DescSyntheticFieldSymbol(
KtFe10DescKotlinPropertySymbol(kotlinProperty, analysisContext)
}
override val type: KtType
override val returnType: KtType
get() = withValidityAssertion { descriptor.propertyDescriptor.type.toKtType(analysisContext) }
override fun createPointer(): KtSymbolPointer<KtVariableLikeSymbol> = withValidityAssertion {
@@ -79,7 +79,7 @@ internal class KtFe10DescSyntheticJavaPropertySymbol(
override val callableIdIfNonLocal: CallableId?
get() = withValidityAssertion { descriptor.callableIdIfNotLocal }
override val type: KtType
override val returnType: KtType
get() = withValidityAssertion { descriptor.type.toKtType(analysisContext) }
override val receiverType: KtType?
@@ -79,7 +79,7 @@ internal class KtFe10DescSyntheticJavaPropertySymbolForOverride(
override val callableIdIfNonLocal: CallableId?
get() = withValidityAssertion { descriptor.callableIdIfNotLocal }
override val type: KtType
override val returnType: KtType
get() = withValidityAssertion { descriptor.type.toKtType(analysisContext) }
override val receiverType: KtType?
@@ -39,7 +39,7 @@ internal class KtFe10DescValueParameterSymbol(
override val isVararg: Boolean
get() = withValidityAssertion { descriptor.isVararg }
override val type: KtType
override val returnType: KtType
get() = withValidityAssertion {
return (descriptor.varargElementType ?: descriptor.type).toKtType(analysisContext)
}
@@ -39,7 +39,7 @@ internal class KtFe10PsiAnonymousFunctionSymbol(
override val hasStableParameterNames: Boolean
get() = withValidityAssertion { true }
override val type: KtType
override val returnType: KtType
get() = withValidityAssertion {
descriptor?.returnType?.toKtType(analysisContext) ?: createErrorType()
}
@@ -50,7 +50,7 @@ internal class KtFe10PsiConstructorSymbol(
override val hasStableParameterNames: Boolean
get() = withValidityAssertion { true }
override val type: KtType
override val returnType: KtType
get() = withValidityAssertion {
descriptor?.returnType?.toKtType(analysisContext) ?: createErrorType()
}
@@ -74,7 +74,7 @@ class KtFe10PsiDefaultPropertyGetterSymbol(
override val callableIdIfNonLocal: CallableId?
get() = withValidityAssertion { null }
override val type: KtType
override val returnType: KtType
get() = withValidityAssertion { descriptor?.type?.toKtType(analysisContext) ?: createErrorType() }
override val receiverType: KtType?
@@ -78,7 +78,7 @@ class KtFe10PsiDefaultPropertySetterSymbol(
override val callableIdIfNonLocal: CallableId?
get() = withValidityAssertion { null }
override val type: KtType
override val returnType: KtType
get() = withValidityAssertion {
return analysisContext.builtIns.unitType.toKtType(analysisContext)
}
@@ -119,7 +119,7 @@ class KtFe10PsiDefaultPropertySetterSymbol(
override val name: Name
get() = withValidityAssertion { Name.identifier("value") }
override val type: KtType
override val returnType: KtType
get() = withValidityAssertion { descriptor?.type?.toKtType(analysisContext) ?: createErrorType() }
override val origin: KtSymbolOrigin
@@ -46,7 +46,7 @@ internal class KtFe10PsiDefaultSetterParameterSymbol(
override val isVararg: Boolean
get() = withValidityAssertion { false }
override val type: KtType
override val returnType: KtType
get() = withValidityAssertion { descriptor?.type?.toKtType(analysisContext) ?: createErrorType() }
override val psi: PsiElement?
@@ -46,7 +46,7 @@ internal class KtFe10PsiEnumEntrySymbol(
override val callableIdIfNonLocal: CallableId?
get() = withValidityAssertion { psi.callableIdIfNonLocal }
override val type: KtType
override val returnType: KtType
get() = withValidityAssertion {
val containingDescriptor = descriptor?.containingDeclaration
if (containingDescriptor is ClassDescriptor && containingDescriptor.kind == ClassKind.ENUM_CLASS) {
@@ -71,7 +71,7 @@ internal class KtFe10PsiFunctionSymbol(
override val callableIdIfNonLocal: CallableId?
get() = withValidityAssertion { psi.callableIdIfNonLocal }
override val type: KtType
override val returnType: KtType
get() = withValidityAssertion { descriptor?.returnType?.toKtType(analysisContext) ?: createErrorType() }
override val receiverType: KtType?
@@ -111,7 +111,7 @@ internal class KtFe10PsiKotlinPropertySymbol(
override val callableIdIfNonLocal: CallableId?
get() = withValidityAssertion { psi.callableIdIfNonLocal }
override val type: KtType
override val returnType: KtType
get() = withValidityAssertion { descriptor?.type?.toKtType(analysisContext) ?: createErrorType() }
override val receiverType: KtType?
@@ -45,7 +45,7 @@ internal class KtFe10PsiLiteralAnonymousFunctionSymbol(
override val hasStableParameterNames: Boolean
get() = withValidityAssertion { true }
override val type: KtType
override val returnType: KtType
get() = withValidityAssertion {
descriptor?.returnType?.toKtType(analysisContext) ?: createErrorType()
}
@@ -36,7 +36,7 @@ internal class KtFe10PsiLocalVariableSymbol(
override val name: Name
get() = withValidityAssertion { psi.nameAsSafeName }
override val type: KtType
override val returnType: KtType
get() = withValidityAssertion { descriptor?.type?.toKtType(analysisContext) ?: createErrorType() }
override val isVal: Boolean
@@ -35,7 +35,7 @@ internal class KtFe10PsiLoopParameterLocalVariableSymbol(
override val name: Name
get() = withValidityAssertion { psi.nameAsSafeName }
override val type: KtType
override val returnType: KtType
get() = withValidityAssertion { descriptor?.type?.toKtType(analysisContext) ?: createErrorType() }
override val isVal: Boolean
@@ -67,7 +67,7 @@ internal class KtFe10PsiPropertyGetterSymbol(
override val callableIdIfNonLocal: CallableId?
get() = withValidityAssertion { null }
override val type: KtType
override val returnType: KtType
get() = withValidityAssertion {
descriptor?.returnType?.toKtType(analysisContext) ?: createErrorType()
}
@@ -68,7 +68,7 @@ internal class KtFe10PsiPropertySetterSymbol(
override val callableIdIfNonLocal: CallableId?
get() = withValidityAssertion { null }
override val type: KtType
override val returnType: KtType
get() = withValidityAssertion {
descriptor?.returnType?.toKtType(analysisContext) ?: createErrorType()
}
@@ -39,7 +39,7 @@ internal class KtFe10PsiValueParameterSymbol(
override val isVararg: Boolean
get() = withValidityAssertion { psi.isVarArg }
override val type: KtType
override val returnType: KtType
get() = withValidityAssertion {
val type = (descriptor as? ValueParameterDescriptor)?.varargElementType ?: descriptor?.type
return type?.toKtType(analysisContext) ?: createErrorType()