[FIR] Introduce containsMultipleNonSubsumed to intersection overrides
After this change the IO created for `SimpleColoredComponent::setToolTipText` will be `containsMultipleNonSubsumed == true` while IOs created for classes in `intersectionOverridesIntersection.kt` will have this property set to `false`. ^KT-65972 Fixed
This commit is contained in:
committed by
Space Team
parent
ee20d979cb
commit
341a23d05c
-35
@@ -1,35 +0,0 @@
|
||||
// FILE: ColoredTextContainer.java
|
||||
public interface ColoredTextContainer {
|
||||
default void setToolTipText(String text) {}
|
||||
}
|
||||
|
||||
// FILE: JComponent.java
|
||||
public abstract class JComponent {
|
||||
public void setToolTipText(String text) {}
|
||||
}
|
||||
|
||||
// FILE: SimpleColoredComponent.java
|
||||
// IDEALLY:
|
||||
// Provides `IO SimpleColoredComponent::setToolTipText`, because inherits
|
||||
// `JComponent::setToolTipText` and `ColoredTextContainer::setToolTipText`,
|
||||
// which don't sumbsume one another, but Java allows picking the class-based one in this case.
|
||||
// REALITY:
|
||||
// Contains an IO for the above. We check if this is green Java via a
|
||||
// modified check that accounts for this case.
|
||||
public class SimpleColoredComponent extends JComponent implements ColoredTextContainer {}
|
||||
|
||||
// FILE: Main.kt
|
||||
|
||||
// Not important, left for the record
|
||||
interface TextFragment : ColoredTextContainer
|
||||
|
||||
// IDEALLY:
|
||||
// Provides `JComponent::setToolTipText`, because inherits
|
||||
// `ColoredTextContainer::setToolTipText` and `IO SimpleColoredComponent::setToolTipText`,
|
||||
// and the latter subsumes the former.
|
||||
// REALITY:
|
||||
// Contains IO between `ColoredTextContainer::setToolTipText` and `IO SimpleColoredComponent::setToolTipText`.
|
||||
// In this case `IO SimpleColoredComponent::setToolTipText` should not be unwrapped, otherwise
|
||||
// we miss `nonSubsumed()` check and since this is a Kotlin class we are not allowed to implicitly choose
|
||||
// between `JComponent::setToolTipText` and `ColoredTextContainer::setToolTipText`.
|
||||
private <!CANNOT_INFER_VISIBILITY!>class TextFragmentImpl<!> : TextFragment, SimpleColoredComponent()
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// FILE: ColoredTextContainer.java
|
||||
public interface ColoredTextContainer {
|
||||
default void setToolTipText(String text) {}
|
||||
|
||||
Reference in New Issue
Block a user