FIR: handle synthetic properties with unstable smartcast
Synthetic properties from Java getter/setters need to be specially handled so that candidates from such symbols are marked with unstable.
This commit is contained in:
committed by
TeamCityServer
parent
ce767046eb
commit
3c8693758b
+6
-2
@@ -45,7 +45,7 @@ class FirUnstableSmartcastTypeScope(
|
||||
}
|
||||
smartcastScope.process(name) {
|
||||
if (it !in unique) {
|
||||
symbolsFromUnstableSmartcast += it
|
||||
markSymbolFromUnstableSmartcast(it)
|
||||
processor(it)
|
||||
}
|
||||
}
|
||||
@@ -72,7 +72,7 @@ class FirUnstableSmartcastTypeScope(
|
||||
|
||||
smartcastScope.process(name) { symbol, firTypeScope ->
|
||||
if (symbol !in unique) {
|
||||
symbolsFromUnstableSmartcast += symbol
|
||||
markSymbolFromUnstableSmartcast(symbol)
|
||||
processor(symbol, firTypeScope)
|
||||
} else {
|
||||
ProcessorAction.NEXT
|
||||
@@ -83,6 +83,10 @@ class FirUnstableSmartcastTypeScope(
|
||||
|
||||
fun isSymbolFromUnstableSmartcast(symbol: AbstractFirBasedSymbol<*>) = symbol in symbolsFromUnstableSmartcast
|
||||
|
||||
fun markSymbolFromUnstableSmartcast(symbol: FirCallableSymbol<*>) {
|
||||
symbolsFromUnstableSmartcast += symbol
|
||||
}
|
||||
|
||||
override fun processDirectOverriddenFunctionsWithBaseScope(
|
||||
functionSymbol: FirNamedFunctionSymbol,
|
||||
processor: (FirNamedFunctionSymbol, FirTypeScope) -> ProcessorAction
|
||||
|
||||
Reference in New Issue
Block a user