FIR: make declarations marked with 'override' implicitly open
#KT-52236 Fixed
This commit is contained in:
committed by
Space Team
parent
9c1a68fcec
commit
6af616d3c3
@@ -13,7 +13,7 @@ KtFunctionSymbol:
|
||||
isOverride: true
|
||||
isStatic: false
|
||||
isSuspend: false
|
||||
modality: FINAL
|
||||
modality: OPEN
|
||||
name: run
|
||||
origin: SOURCE
|
||||
receiverParameter: null
|
||||
|
||||
@@ -41,7 +41,7 @@ KtFunctionSymbol:
|
||||
isOverride: true
|
||||
isStatic: false
|
||||
isSuspend: false
|
||||
modality: FINAL
|
||||
modality: OPEN
|
||||
name: foo
|
||||
origin: SOURCE
|
||||
receiverParameter: null
|
||||
@@ -84,7 +84,7 @@ KtFunctionSymbol:
|
||||
isOverride: true
|
||||
isStatic: false
|
||||
isSuspend: false
|
||||
modality: FINAL
|
||||
modality: OPEN
|
||||
name: foo
|
||||
origin: SOURCE
|
||||
receiverParameter: null
|
||||
@@ -133,7 +133,7 @@ KtKotlinPropertySymbol:
|
||||
isOverride: true
|
||||
isStatic: false
|
||||
isVal: true
|
||||
modality: FINAL
|
||||
modality: OPEN
|
||||
name: i
|
||||
origin: SOURCE
|
||||
receiverParameter: null
|
||||
@@ -180,7 +180,7 @@ KtFunctionSymbol:
|
||||
isOverride: true
|
||||
isStatic: false
|
||||
isSuspend: false
|
||||
modality: FINAL
|
||||
modality: OPEN
|
||||
name: foo
|
||||
origin: SOURCE
|
||||
receiverParameter: null
|
||||
@@ -208,7 +208,7 @@ KtFunctionSymbol:
|
||||
isOverride: true
|
||||
isStatic: false
|
||||
isSuspend: false
|
||||
modality: FINAL
|
||||
modality: OPEN
|
||||
name: foo
|
||||
origin: SOURCE
|
||||
receiverParameter: null
|
||||
|
||||
@@ -124,7 +124,7 @@ KtKotlinPropertySymbol:
|
||||
isOverride: true
|
||||
isStatic: false
|
||||
isVal: true
|
||||
modality: FINAL
|
||||
modality: OPEN
|
||||
name: exitAnimation
|
||||
origin: SOURCE
|
||||
receiverParameter: null
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ FILE: propertyWithSetter.kt
|
||||
super<R|Foo|>()
|
||||
}
|
||||
|
||||
public final override [BODY_RESOLVE] var id: R|kotlin/Int| = Int(1)
|
||||
public open override [BODY_RESOLVE] var id: R|kotlin/Int| = Int(1)
|
||||
public [BODY_RESOLVE] get(): R|kotlin/Int|
|
||||
public [BODY_RESOLVE] set([BODY_RESOLVE] value: R|kotlin/Int|): R|kotlin/Unit|
|
||||
|
||||
|
||||
@@ -382,11 +382,11 @@ FILE: delegates.kt
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final override operator [RAW_FIR] fun getValue([RAW_FIR] thisRef: R|kotlin/Any?|, [RAW_FIR] property: R|kotlin/reflect/KProperty<*>|): R|kotlin/Int| {
|
||||
public open override operator [RAW_FIR] fun getValue([RAW_FIR] thisRef: R|kotlin/Any?|, [RAW_FIR] property: R|kotlin/reflect/KProperty<*>|): R|kotlin/Int| {
|
||||
^getValue Int(1)
|
||||
}
|
||||
|
||||
public final override operator [RAW_FIR] fun setValue([RAW_FIR] thisRef: R|kotlin/Any?|, [RAW_FIR] property: R|kotlin/reflect/KProperty<*>|, [RAW_FIR] value: R|kotlin/Int|): R|kotlin/Unit| {
|
||||
public open override operator [RAW_FIR] fun setValue([RAW_FIR] thisRef: R|kotlin/Any?|, [RAW_FIR] property: R|kotlin/reflect/KProperty<*>|, [RAW_FIR] value: R|kotlin/Int|): R|kotlin/Unit| {
|
||||
}
|
||||
|
||||
}
|
||||
@@ -430,11 +430,11 @@ FILE: delegates.kt
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final override operator [BODY_RESOLVE] fun getValue([BODY_RESOLVE] thisRef: R|kotlin/Any?|, [BODY_RESOLVE] property: R|kotlin/reflect/KProperty<*>|): R|kotlin/Int| {
|
||||
public open override operator [BODY_RESOLVE] fun getValue([BODY_RESOLVE] thisRef: R|kotlin/Any?|, [BODY_RESOLVE] property: R|kotlin/reflect/KProperty<*>|): R|kotlin/Int| {
|
||||
^getValue Int(1)
|
||||
}
|
||||
|
||||
public final override operator [BODY_RESOLVE] fun setValue([BODY_RESOLVE] thisRef: R|kotlin/Any?|, [BODY_RESOLVE] property: R|kotlin/reflect/KProperty<*>|, [BODY_RESOLVE] value: R|kotlin/Int|): R|kotlin/Unit| {
|
||||
public open override operator [BODY_RESOLVE] fun setValue([BODY_RESOLVE] thisRef: R|kotlin/Any?|, [BODY_RESOLVE] property: R|kotlin/reflect/KProperty<*>|, [BODY_RESOLVE] value: R|kotlin/Int|): R|kotlin/Unit| {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Vendored
+2
-2
@@ -150,7 +150,7 @@ FILE: anonymousObjectInInvalidPosition.kt
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final override [BODY_RESOLVE] fun x(): R|kotlin/Unit| {
|
||||
public open override [BODY_RESOLVE] fun x(): R|kotlin/Unit| {
|
||||
}
|
||||
|
||||
}
|
||||
@@ -168,7 +168,7 @@ FILE: anonymousObjectInInvalidPosition.kt
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final override [BODY_RESOLVE] fun x(): R|kotlin/Unit| {
|
||||
public open override [BODY_RESOLVE] fun x(): R|kotlin/Unit| {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
public final override [BODY_RESOLVE] fun baseMember(): R|kotlin/Int| {
|
||||
public open override [BODY_RESOLVE] fun baseMember(): R|kotlin/Int| {
|
||||
^baseMember Int(3)
|
||||
}
|
||||
|
||||
+3
-2
@@ -197,8 +197,9 @@ internal open class SymbolLightClassForClassOrObject : SymbolLightClassForNamedC
|
||||
val nonFinalFunctionsFromAny = classOrObjectSymbol.getMemberScope()
|
||||
.getCallableSymbols { name -> name.isFromAny }
|
||||
.filterIsInstance<KtFunctionSymbol>()
|
||||
.filterNot { it.modality == Modality.FINAL }
|
||||
.filter { actuallyComesFromAny(it) }
|
||||
.filterNot {
|
||||
it.modality == Modality.FINAL || (it.getContainingSymbol() as? KtNamedClassOrObjectSymbol)?.modality == Modality.FINAL
|
||||
}.filter { actuallyComesFromAny(it) }
|
||||
|
||||
val functionsFromAnyByName = nonFinalFunctionsFromAny.associateBy { it.name }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user