Migration to expect/actual: renames in DeclarationsChecker
This commit is contained in:
@@ -167,11 +167,11 @@ class DeclarationsChecker(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (declaration.hasActualModifier()) {
|
if (declaration.hasActualModifier()) {
|
||||||
checkImplTypeAlias(declaration, typeAliasDescriptor)
|
checkActualTypeAlias(declaration, typeAliasDescriptor)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun checkImplTypeAlias(declaration: KtTypeAlias, typeAliasDescriptor: TypeAliasDescriptor) {
|
private fun checkActualTypeAlias(declaration: KtTypeAlias, typeAliasDescriptor: TypeAliasDescriptor) {
|
||||||
val rhs = typeAliasDescriptor.underlyingType
|
val rhs = typeAliasDescriptor.underlyingType
|
||||||
val classDescriptor = rhs.constructor.declarationDescriptor
|
val classDescriptor = rhs.constructor.declarationDescriptor
|
||||||
if (classDescriptor !is ClassDescriptor) {
|
if (classDescriptor !is ClassDescriptor) {
|
||||||
@@ -246,10 +246,10 @@ class DeclarationsChecker(
|
|||||||
identifierChecker.checkDeclaration(declaration, trace)
|
identifierChecker.checkDeclaration(declaration, trace)
|
||||||
checkVarargParameters(trace, constructorDescriptor)
|
checkVarargParameters(trace, constructorDescriptor)
|
||||||
checkConstructorVisibility(constructorDescriptor, declaration)
|
checkConstructorVisibility(constructorDescriptor, declaration)
|
||||||
checkHeaderClassConstructor(constructorDescriptor, declaration)
|
checkExpectedClassConstructor(constructorDescriptor, declaration)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun checkHeaderClassConstructor(constructorDescriptor: ClassConstructorDescriptor, declaration: KtConstructor<*>) {
|
private fun checkExpectedClassConstructor(constructorDescriptor: ClassConstructorDescriptor, declaration: KtConstructor<*>) {
|
||||||
if (!constructorDescriptor.isExpect) return
|
if (!constructorDescriptor.isExpect) return
|
||||||
|
|
||||||
if (declaration.hasBody()) {
|
if (declaration.hasBody()) {
|
||||||
@@ -723,13 +723,13 @@ class DeclarationsChecker(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (functionDescriptor.isExpect) {
|
if (functionDescriptor.isExpect) {
|
||||||
checkHeaderFunction(function)
|
checkExpectedFunction(function)
|
||||||
}
|
}
|
||||||
|
|
||||||
shadowedExtensionChecker.checkDeclaration(function, functionDescriptor)
|
shadowedExtensionChecker.checkDeclaration(function, functionDescriptor)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun checkHeaderFunction(function: KtNamedFunction) {
|
private fun checkExpectedFunction(function: KtNamedFunction) {
|
||||||
if (function.hasBody()) {
|
if (function.hasBody()) {
|
||||||
trace.report(EXPECTED_DECLARATION_WITH_BODY.on(function))
|
trace.report(EXPECTED_DECLARATION_WITH_BODY.on(function))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user