Exposed visibility checking, a set of exposed visibility tests, some test fixes

Effective visibility mechanism introduced.
Local is considered as public, java protected as Kotlin protected, java package private as Kotlin private.
This commit is contained in:
Mikhail Glukhikh
2015-10-01 21:10:50 +03:00
committed by Mikhail Glukhikh
parent fa32aa2950
commit 0cc861f00b
73 changed files with 965 additions and 108 deletions
@@ -17,6 +17,7 @@
package org.jetbrains.kotlin.load.java;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.kotlin.descriptors.*;
import org.jetbrains.kotlin.resolve.DescriptorUtils;
import org.jetbrains.kotlin.resolve.scopes.receivers.ReceiverValue;
@@ -54,6 +55,12 @@ public class JavaVisibilities {
public Visibility normalize() {
return Visibilities.PROTECTED;
}
@NotNull
@Override
public EffectiveVisibility effectiveVisibility(@Nullable ClassDescriptor classDescriptor) {
return EffectiveVisibility.Companion.effectiveVisibility(Visibilities.PRIVATE, classDescriptor);
}
};
public static final Visibility PROTECTED_STATIC_VISIBILITY = new Visibility("protected_static", true) {