[FIR] Ignore private properties in accessor override check
JavaClassUseSiteMemberScope won't return a Java method getFoo if there is an inherited Kotlin property foo in scope because calling this method would effectively call the property accessor which is not possible in Kotlin. This commit excludes private properties from this consideration because no accessor methods are generated for them, and so calling a Java method getFoo is ok. #KT-58577 Fixed
This commit is contained in:
committed by
Space Team
parent
442844f165
commit
993925f656
Vendored
+3
@@ -9,6 +9,9 @@ C:
|
||||
D:
|
||||
[Source]: public open override fun getName(): R|kotlin/String| from Java enhancement scope for /D [id: 0]
|
||||
[Enhancement]: public abstract fun getName(): R|kotlin/String!| from Substitution scope for [Java enhancement scope for /B] for type C [id: 1]
|
||||
[Source]: public open override fun setName(newName: R|kotlin/String|): R|kotlin/Any?| from Java enhancement scope for /D [id: 0]
|
||||
[SubstitutionOverride]: public abstract fun setName(newName: R|kotlin/String!|): R|kotlin/Any!| from Substitution scope for [Java enhancement scope for /B] for type C [id: 1]
|
||||
[Enhancement]: public abstract fun setName(newName: R|kotlin/String!|): R|ft<T & Any, T?>| from Java enhancement scope for /B [id: 2]
|
||||
[Source]: private final var name: R|kotlin/String| = R|<local>/name| from Java enhancement scope for /D [id: 0]
|
||||
[Source]: private final var name: R|kotlin/String| = R|<local>/name| from Use site scope of /C [id: 0]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user