Analysis API: rename KtCallableSymbol.type -> returnType
This commit is contained in:
+1
-1
@@ -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?
|
||||
|
||||
+1
-1
@@ -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>
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
+1
-1
@@ -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?
|
||||
|
||||
+1
-1
@@ -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 {
|
||||
|
||||
+1
-1
@@ -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?
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
+1
-1
@@ -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?
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
+1
-1
@@ -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?
|
||||
|
||||
+1
-1
@@ -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 {
|
||||
|
||||
+1
-1
@@ -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?
|
||||
|
||||
+1
-1
@@ -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?
|
||||
|
||||
+1
-1
@@ -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)
|
||||
}
|
||||
|
||||
+1
-1
@@ -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()
|
||||
}
|
||||
|
||||
+1
-1
@@ -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()
|
||||
}
|
||||
|
||||
+1
-1
@@ -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?
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
+1
-1
@@ -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?
|
||||
|
||||
+1
-1
@@ -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) {
|
||||
|
||||
+1
-1
@@ -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?
|
||||
|
||||
+1
-1
@@ -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?
|
||||
|
||||
+1
-1
@@ -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()
|
||||
}
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
+1
-1
@@ -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()
|
||||
}
|
||||
|
||||
+1
-1
@@ -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()
|
||||
}
|
||||
|
||||
+1
-1
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user