-
Notifications
You must be signed in to change notification settings - Fork 67
Closed as duplicate
Closed as duplicate
Copy link
Labels
bugSomething isn't workingSomething isn't working
Description
Example 1
@PrivateApi
class KtPrivateApi {
fun foo() = Unit
}
class KtPublicApi : KtPrivateApi() {
}
fun usage() {
KtPublicApi().foo() // ok, if @PrivateApi applies only for the class declaration but not its members
}Example 2
This is not applicable for Kotlin, but should be supported in a library, which has compiled classes as input.
class JavaPackagePrivateClass {
public void foo() {}
}
public class JavaPublicClass extends JavaPackagePrivateClass {
}
void usage() {
new JavaPublicClass().foo(); // accessible
}For IJ, I've implemented this here:
https://github.com/JetBrains/intellij-community/blob/f8819a2580a0cc6c2f6a456a6a5fa83bf2e3cf7e/tools/apiDump/src/impl.kt#L134
Also please take a look at supertype expansion:
https://github.com/JetBrains/intellij-community/blob/f8819a2580a0cc6c2f6a456a6a5fa83bf2e3cf7e/tools/apiDump/src/impl.kt#L340
It solves this problem:
| // not covered the case when there is public superclass after chain of private superclasses |
jreij and OscarSpruit
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working