Skip to content

Commit

Permalink
K2: drop redundant ExpectActualMatchingContext.isInline
Browse files Browse the repository at this point in the history
Related to KT-73785
  • Loading branch information
mglukhikh authored and qodana-bot committed Dec 12, 2024
1 parent d26ccb8 commit ca74ad2
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,8 @@ class FirExpectActualMatchingContextImpl private constructor(
get() = asSymbol().resolvedStatus.isCompanion
override val RegularClassSymbolMarker.isInner: Boolean
get() = asSymbol().resolvedStatus.isInner
override val RegularClassSymbolMarker.isInline: Boolean
get() = asSymbol().resolvedStatus.isInline
override val RegularClassSymbolMarker.isValue: Boolean
get() = asSymbol().resolvedStatus.isValue
override val RegularClassSymbolMarker.isInlineOrValue: Boolean
get() = asSymbol().resolvedStatus.let { it.isInline || it.isValue }

override val RegularClassSymbolMarker.isFun: Boolean
get() = asSymbol().resolvedStatus.isFun
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,7 @@ internal abstract class IrExpectActualMatchingContext(
get() = asIr().isCompanion
override val RegularClassSymbolMarker.isInner: Boolean
get() = asIr().isInner
override val RegularClassSymbolMarker.isInline: Boolean
get() = asIr().isValue
override val RegularClassSymbolMarker.isValue: Boolean
override val RegularClassSymbolMarker.isInlineOrValue: Boolean
get() = asIr().isValue

override val RegularClassSymbolMarker.isFun: Boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ object AbstractExpectActualChecker {

if (!areCompatibleClassKinds(expectClassSymbol, actualClass)) return ExpectActualCheckingCompatibility.ClassKind

if (!equalBy(expectClassSymbol, actualClass) { listOf(it.isCompanion, it.isInner, it.isInline || it.isValue) }) {
if (!equalBy(expectClassSymbol, actualClass) { listOf(it.isCompanion, it.isInner, it.isInlineOrValue) }) {
return ExpectActualCheckingCompatibility.ClassModifiers
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ interface ExpectActualMatchingContext<T : DeclarationSymbolMarker> : TypeSystemC

val RegularClassSymbolMarker.isCompanion: Boolean
val RegularClassSymbolMarker.isInner: Boolean
val RegularClassSymbolMarker.isInline: Boolean
val RegularClassSymbolMarker.isValue: Boolean
val RegularClassSymbolMarker.isInlineOrValue: Boolean
val RegularClassSymbolMarker.isFun: Boolean
val ClassLikeSymbolMarker.typeParameters: List<TypeParameterSymbolMarker>

Expand Down

0 comments on commit ca74ad2

Please sign in to comment.