[FIR] Allow declarations to override parts of non-trivial intersection
A class can inherit two declarations that are compatible from the overridability standpoint and are therefore combined to a non-trivial intersection. At the same time, the class can declare a member declaration that only overrides one of the intersection's members. In this case, we break up the intersection and only add the overridden parts to the declared member's direct overridden list. If the class doesn't override the intersection, it exists as intersection override, like before. #KT-65487 Fixed
This commit is contained in:
committed by
Space Team
parent
889182629e
commit
26fae9e83a
Vendored
+3
-5
@@ -1,14 +1,12 @@
|
||||
ImplDerived:
|
||||
[Source]: public abstract override fun foo(name: R|kotlin/String?|): R|Derived| from Use site scope of /ImplDerived [id: 0]
|
||||
[Source]: public open override fun foo(name: R|kotlin/String|): R|Base| from Use site scope of /Impl [id: 1]
|
||||
[Enhancement]: public abstract fun foo(name: R|@EnhancedNullability kotlin/String|): R|Base!| from Java enhancement scope for /Base [id: 2]
|
||||
[Enhancement]: public abstract fun foo(name: R|kotlin/String!|): R|@EnhancedNullability Derived| from Java enhancement scope for /Derived [id: 3]
|
||||
[Enhancement]: public abstract fun foo(name: R|kotlin/String!|): R|@EnhancedNullability Derived| from Java enhancement scope for /Derived [id: 1]
|
||||
[Enhancement]: public abstract fun foo(name: R|@EnhancedNullability kotlin/String|): R|Base!| from Java enhancement scope for /Base [id: 2]
|
||||
[Source]: public open override fun foo(name: R|kotlin/String|): R|Base| from Use site scope of /ImplDerived [id: 0]
|
||||
|
||||
DerivedImpl:
|
||||
[Source]: public abstract override fun foo(name: R|kotlin/String?|): R|Derived| from Use site scope of /DerivedImpl [id: 0]
|
||||
[Enhancement]: public abstract fun foo(name: R|kotlin/String!|): R|@EnhancedNullability Derived| from Java enhancement scope for /Derived [id: 1]
|
||||
[Enhancement]: public abstract fun foo(name: R|@EnhancedNullability kotlin/String|): R|Base!| from Java enhancement scope for /Base [id: 2]
|
||||
[Source]: public open override fun foo(name: R|kotlin/String|): R|Base| from Use site scope of /Impl [id: 3]
|
||||
[Enhancement]: public abstract fun foo(name: R|@EnhancedNullability kotlin/String|): R|Base!| from Java enhancement scope for /Base [id: 2]
|
||||
[Source]: public open override fun foo(name: R|kotlin/String|): R|Base| from Use site scope of /DerivedImpl [id: 0]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user