FIR: support private-in-file effective visibility

This commit is contained in:
Mikhail Glukhikh
2021-04-07 14:43:14 +03:00
parent 6ee169c01e
commit 9af1de272e
9 changed files with 31 additions and 26 deletions
+6 -6
View File
@@ -2,18 +2,18 @@ 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 'A'">B<A></error>(x)
class C(<error descr="[EXPOSED_PARAMETER_TYPE] public function exposes its private-in-file parameter type 'A'">x: A</error>): <error descr="[EXPOSED_SUPER_CLASS] public subclass exposes its private-in-file supertype 'A'">B<A></error>(x)
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-in-file return type 'A'">create</error>() = A()
fun <error descr="[EXPOSED_FUNCTION_RETURN_TYPE] public function exposes its private return type 'A'">create</error>(<error descr="[EXPOSED_PARAMETER_TYPE] public function exposes its private parameter type 'A'">a: A</error>) = B(a)
fun <error descr="[EXPOSED_FUNCTION_RETURN_TYPE] public function exposes its private-in-file return type 'A'">create</error>(<error descr="[EXPOSED_PARAMETER_TYPE] public function exposes its private-in-file 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-in-file type 'A'">x</error> = create()
val <error descr="[EXPOSED_PROPERTY_TYPE] public property exposes its private type 'A'">y</error> = create(x)
val <error descr="[EXPOSED_PROPERTY_TYPE] public property exposes its private-in-file type 'A'">y</error> = create(x)
val <error descr="[EXPOSED_PROPERTY_TYPE] public property exposes its private type 'E'">z</error>: B<D.E>? = null
val <error descr="[EXPOSED_PROPERTY_TYPE] public property exposes its private-in-file type 'E'">z</error>: B<D.E>? = null