Fix implementation doesn't match name of property
Currently, property `hasSourceAnnotationsErased` returns the opposite to what is stated in name. Invert it both in implementation and on call site. ^KT-58551
This commit is contained in:
committed by
Space Team
parent
a1a1049aa8
commit
05cead2ab5
+1
-1
@@ -375,7 +375,7 @@ class FirExpectActualMatchingContextImpl private constructor(
|
|||||||
override val DeclarationSymbolMarker.hasSourceAnnotationsErased: Boolean
|
override val DeclarationSymbolMarker.hasSourceAnnotationsErased: Boolean
|
||||||
get() {
|
get() {
|
||||||
val symbol = asSymbol()
|
val symbol = asSymbol()
|
||||||
return symbol.source != null || symbol.origin is FirDeclarationOrigin.Plugin
|
return symbol.source == null && symbol.origin !is FirDeclarationOrigin.Plugin
|
||||||
}
|
}
|
||||||
|
|
||||||
object Factory : FirExpectActualMatchingContextFactory {
|
object Factory : FirExpectActualMatchingContextFactory {
|
||||||
|
|||||||
+1
-1
@@ -491,6 +491,6 @@ internal abstract class IrExpectActualMatchingContext(
|
|||||||
override val DeclarationSymbolMarker.hasSourceAnnotationsErased: Boolean
|
override val DeclarationSymbolMarker.hasSourceAnnotationsErased: Boolean
|
||||||
get() {
|
get() {
|
||||||
val ir = asIr()
|
val ir = asIr()
|
||||||
return ir.sourceElement() != null || ir.origin is IrDeclarationOrigin.GeneratedByPlugin
|
return ir.sourceElement() == null && ir.origin !is IrDeclarationOrigin.GeneratedByPlugin
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -47,7 +47,7 @@ object AbstractExpectActualAnnotationMatchChecker {
|
|||||||
// TODO(Roman.Efremov, KT-58551): fix actual typealias class members not checked in FE checkers
|
// TODO(Roman.Efremov, KT-58551): fix actual typealias class members not checked in FE checkers
|
||||||
// TODO(Roman.Efremov, KT-58551): check annotations on fake overrides in case of implicit actualization
|
// TODO(Roman.Efremov, KT-58551): check annotations on fake overrides in case of implicit actualization
|
||||||
|
|
||||||
val skipSourceAnnotations = !actualSymbol.hasSourceAnnotationsErased
|
val skipSourceAnnotations = actualSymbol.hasSourceAnnotationsErased
|
||||||
val actualAnnotationsByName = actualSymbol.annotations.groupBy { it.classId }
|
val actualAnnotationsByName = actualSymbol.annotations.groupBy { it.classId }
|
||||||
|
|
||||||
for (expectAnnotation in expectSymbol.annotations) {
|
for (expectAnnotation in expectSymbol.annotations) {
|
||||||
|
|||||||
+3
-3
@@ -369,8 +369,8 @@ class ClassicExpectActualMatchingContext(val platformModule: ModuleDescriptor) :
|
|||||||
|
|
||||||
override val DeclarationSymbolMarker.hasSourceAnnotationsErased: Boolean
|
override val DeclarationSymbolMarker.hasSourceAnnotationsErased: Boolean
|
||||||
get() {
|
get() {
|
||||||
return DescriptorUtils.getContainingSourceFile(asDescriptor()) != SourceFile.NO_SOURCE_FILE ||
|
return DescriptorUtils.getContainingSourceFile(asDescriptor()) == SourceFile.NO_SOURCE_FILE &&
|
||||||
this is K1SyntheticClassifierSymbolMarker ||
|
this !is K1SyntheticClassifierSymbolMarker &&
|
||||||
this is CallableMemberDescriptor && kind == CallableMemberDescriptor.Kind.SYNTHESIZED
|
!(this is CallableMemberDescriptor && kind == CallableMemberDescriptor.Kind.SYNTHESIZED)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user