[FIR] Support flexible types and star projections in exposed visibility declaration checker

#KT-62925
This commit is contained in:
Evgeniy.Zhelenskiy
2023-10-26 18:41:02 +02:00
committed by Space Team
parent bf86afc867
commit a836e6bf29
3 changed files with 22 additions and 9 deletions
@@ -19,9 +19,9 @@ class His {
// Ok: internal vs package-private in same package
internal fun internal() = My.foo()
// Error: protected vs package-private
protected fun protected() = My.foo()
protected fun <!EXPOSED_FUNCTION_RETURN_TYPE!>protected<!>() = My.foo()
// Error: public vs package-private
fun public() = My.foo()
fun <!EXPOSED_FUNCTION_RETURN_TYPE!>public<!>() = My.foo()
}
// FILE: other/Your.kt
@@ -13,5 +13,5 @@ interface Generic<E: <!EXPOSED_TYPE_PARAMETER_BOUND!>My<!>>
interface Our {
// invalid, Generic<My> is effectively internal
fun foo(): Generic<*>
}
fun <!EXPOSED_FUNCTION_RETURN_TYPE!>foo<!>(): Generic<*>
}