Effective visibility: concise diagnostic messages #KT-10761 Fixed
Also #KT-9760 Fixed
This commit is contained in:
committed by
Mikhail Glukhikh
parent
3049961b9a
commit
1bbc46729c
+20
@@ -0,0 +1,20 @@
|
||||
class A {
|
||||
internal companion object {
|
||||
class B {
|
||||
class C
|
||||
interface D
|
||||
companion object {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun <error descr="[EXPOSED_RECEIVER_TYPE] 'public' member exposes its 'internal' receiver type containing declaration Companion">A.Companion.B.C</error>.foo() {}
|
||||
|
||||
interface E : <error descr="[EXPOSED_SUPER_INTERFACE] 'public' sub-interface exposes its 'internal' supertype containing declaration Companion">A.Companion.B.D</error>
|
||||
|
||||
val <error descr="[EXPOSED_PROPERTY_TYPE] 'public' property exposes its 'internal' type containing declaration Companion">x</error> = A.Companion.B
|
||||
|
||||
class F<<error descr="[EXPOSED_TYPE_PARAMETER_BOUND] 'public' generic exposes its 'internal' parameter bound type containing declaration Companion">T : A.Companion.B</error>>(val x: T)
|
||||
|
||||
|
||||
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
private class A
|
||||
|
||||
open class B<T>(val x: T)
|
||||
|
||||
class C(<error descr="[EXPOSED_PARAMETER_TYPE] 'public' function exposes its 'private' parameter type A">x: A</error>): <error descr="[EXPOSED_SUPER_CLASS] 'public' subclass exposes its 'private' supertype argument A">B<A>(x)</error>
|
||||
|
||||
private class D {
|
||||
class E
|
||||
}
|
||||
|
||||
fun <error descr="[EXPOSED_FUNCTION_RETURN_TYPE] 'public' function exposes its 'private' return type A">create</error>() = A()
|
||||
|
||||
fun <error descr="[EXPOSED_FUNCTION_RETURN_TYPE] 'public' function exposes its 'private' return type argument A">create</error>(<error descr="[EXPOSED_PARAMETER_TYPE] 'public' function exposes its 'private' parameter type A">a: A</error>) = B(a)
|
||||
|
||||
val <error descr="[EXPOSED_PROPERTY_TYPE] 'public' property exposes its 'private' type A">x</error> = create()
|
||||
|
||||
val <error descr="[EXPOSED_PROPERTY_TYPE] 'public' property exposes its 'private' type argument A">y</error> = create(x)
|
||||
|
||||
val <error descr="[EXPOSED_PROPERTY_TYPE] 'public' property exposes its 'private' type argument containing declaration D">z</error>: B<D.E>? = null
|
||||
Reference in New Issue
Block a user