[FIR] Properly calculate visibilities
`testIntersectionOfPrimitiveBasedFunctions` is fine, because we deprecate this already in ^KT-63243. `CANNOT_INFER_VISIBILITY` is positioned as `DECLARATION_NAME`, just in case we decide for some reason that we do want to report it along with `MANY_*_NOT_IMPLEMENTED`. In that case, we'd get a problem that their bounds overlap, but not completely contain one another. ^KT-63741 Fixed ^KT-59400 Fixed
This commit is contained in:
committed by
Space Team
parent
7056ad5325
commit
8f8c7fe7cf
+1
-1
@@ -1,5 +1,5 @@
|
||||
E:
|
||||
[IntersectionOverride]: public open override fun foo(x: R|kotlin/Int|): R|kotlin/String| from Use site scope of /E [id: 0]
|
||||
[IntersectionOverride]: public? open override fun foo(x: R|kotlin/Int|): R|kotlin/String| from Use site scope of /E [id: 0]
|
||||
[SubstitutionOverride(DeclarationSite)]: public open override fun foo(x: R|kotlin/Int!|): R|kotlin/String!| from Use site scope of /C [id: 1]
|
||||
[SubstitutionOverride(DeclarationSite)]: public open override fun foo(x: R|kotlin/Int!|): R|kotlin/String!| from Substitution scope for [Java enhancement scope for /A] for type C [id: 1]
|
||||
[Enhancement]: public open fun foo(x: R|ft<T & Any, T?>|): R|kotlin/String!| from Java enhancement scope for /A [id: 2]
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
interface T {
|
||||
public fun foo()
|
||||
}
|
||||
|
||||
open class C {
|
||||
protected fun foo() {}
|
||||
}
|
||||
|
||||
class D : C(), T
|
||||
|
||||
val obj: C = object : C(), T {}
|
||||
@@ -1,11 +0,0 @@
|
||||
interface T {
|
||||
public fun foo()
|
||||
}
|
||||
|
||||
open class C {
|
||||
protected fun foo() {}
|
||||
}
|
||||
|
||||
class <!CANNOT_INFER_VISIBILITY!>D<!> : C(), T
|
||||
|
||||
val obj: C = <!CANNOT_INFER_VISIBILITY!>object<!> : C(), T {}
|
||||
@@ -1,26 +0,0 @@
|
||||
package
|
||||
|
||||
public val obj: C
|
||||
|
||||
public open class C {
|
||||
public constructor C()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
protected final fun foo(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final class D : C, T {
|
||||
public constructor D()
|
||||
public open override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final override /*2*/ /*fake_override*/ fun foo(): kotlin.Unit
|
||||
public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public interface T {
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public abstract fun foo(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
@@ -1,3 +1,5 @@
|
||||
// ISSUES: KT-2491, KT-4785, KT-63741, KT-59400
|
||||
|
||||
interface T {
|
||||
fun foo()
|
||||
}
|
||||
@@ -6,6 +8,6 @@ open class C {
|
||||
protected fun foo() {}
|
||||
}
|
||||
|
||||
class E : C(), T
|
||||
class <!CANNOT_WEAKEN_ACCESS_PRIVILEGE!>E<!> : C(), T
|
||||
|
||||
val z: T = object : C(), T {}
|
||||
val z: T = <!CANNOT_WEAKEN_ACCESS_PRIVILEGE!>object<!> : C(), T {}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// ISSUES: KT-2491, KT-4785, KT-63741, KT-59400
|
||||
|
||||
interface T {
|
||||
fun foo()
|
||||
}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
// FIR_IDENTICAL
|
||||
// ISSUE: KT-63741
|
||||
|
||||
interface AreaInstance {
|
||||
fun getExtensionArea(): Int
|
||||
}
|
||||
|
||||
interface ComponentManager : AreaInstance {
|
||||
override fun getExtensionArea() = 10
|
||||
}
|
||||
|
||||
interface Project : ComponentManager, AreaInstance
|
||||
|
||||
class MockProject : ComponentManager, Project
|
||||
Reference in New Issue
Block a user