Package private visibility for private top-level members
This commit is contained in:
@@ -385,7 +385,7 @@ public class AsmUtil {
|
||||
}
|
||||
|
||||
if (containingDeclaration instanceof PackageFragmentDescriptor) {
|
||||
return ACC_PUBLIC;
|
||||
return NO_FLAG_PACKAGE_PRIVATE;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -247,7 +247,7 @@ public fun Instruction.getPrimaryDeclarationDescriptorIfAny(bindingContext: Bind
|
||||
public val Instruction.sideEffectFree: Boolean
|
||||
get() = owner.isSideEffectFree(this)
|
||||
|
||||
private fun Instruction.calcSideEffectFree(): Boolean {
|
||||
fun Instruction.calcSideEffectFree(): Boolean {
|
||||
if (this !is InstructionWithValue) return false
|
||||
if (!inputValues.all { it.createdAt?.sideEffectFree ?: false }) return false
|
||||
|
||||
|
||||
@@ -133,7 +133,7 @@ fun createQualifier(
|
||||
return qualifier
|
||||
}
|
||||
|
||||
private fun QualifierReceiver.resolveAsStandaloneExpression(
|
||||
fun QualifierReceiver.resolveAsStandaloneExpression(
|
||||
context: ExpressionTypingContext,
|
||||
symbolUsageValidator: SymbolUsageValidator
|
||||
): JetType? {
|
||||
@@ -150,7 +150,7 @@ private fun QualifierReceiver.resolveAsStandaloneExpression(
|
||||
return null
|
||||
}
|
||||
|
||||
private fun QualifierReceiver.resolveAsReceiverInQualifiedExpression(
|
||||
fun QualifierReceiver.resolveAsReceiverInQualifiedExpression(
|
||||
context: ExpressionTypingContext,
|
||||
symbolUsageValidator: SymbolUsageValidator,
|
||||
selector: DeclarationDescriptor?
|
||||
|
||||
+3
-3
@@ -55,11 +55,11 @@ public final class _DefaultPackage {
|
||||
|
||||
@kotlin.jvm.internal.KotlinDelegatedMethod(implementationClassName = "_DefaultPackageKt")
|
||||
@org.jetbrains.annotations.Nullable
|
||||
public static final java.lang.String getPrivateN() { /* compiled code */ }
|
||||
static final java.lang.String getPrivateN() { /* compiled code */ }
|
||||
|
||||
@kotlin.jvm.internal.KotlinDelegatedMethod(implementationClassName = "_DefaultPackageKt")
|
||||
@org.jetbrains.annotations.NotNull
|
||||
public static final java.lang.String getPrivateNn() { /* compiled code */ }
|
||||
static final java.lang.String getPrivateNn() { /* compiled code */ }
|
||||
|
||||
@kotlin.jvm.internal.KotlinDelegatedMethod(implementationClassName = "_DefaultPackageKt")
|
||||
@org.jetbrains.annotations.NotNull
|
||||
@@ -89,5 +89,5 @@ public final class _DefaultPackage {
|
||||
|
||||
@kotlin.jvm.internal.KotlinDelegatedMethod(implementationClassName = "_DefaultPackageKt")
|
||||
@org.jetbrains.annotations.Nullable
|
||||
public static final java.lang.String privateFun(@org.jetbrains.annotations.NotNull java.lang.String a, @org.jetbrains.annotations.Nullable java.lang.String b) { /* compiled code */ }
|
||||
static final java.lang.String privateFun(@org.jetbrains.annotations.NotNull java.lang.String a, @org.jetbrains.annotations.Nullable java.lang.String b) { /* compiled code */ }
|
||||
}
|
||||
@@ -1,8 +1,9 @@
|
||||
package test
|
||||
|
||||
private val packageProp = "O"
|
||||
/*TODO rollback when supported*/
|
||||
/*private*/ val packageProp = "O"
|
||||
|
||||
private fun packageFun() = "K"
|
||||
/*private*/ fun packageFun() = "K"
|
||||
|
||||
internal inline fun packageInline(p: (String, String) -> String): String {
|
||||
return p(packageProp, packageFun())
|
||||
|
||||
+2
-2
@@ -30,12 +30,12 @@ import org.jetbrains.kotlin.psi.JetDotQualifiedExpression
|
||||
import org.jetbrains.kotlin.psi.psiUtil.getReceiverExpression
|
||||
import org.jetbrains.kotlin.psi.JetExpression
|
||||
|
||||
private fun getReferenceExpression(element: PsiElement?): JetSimpleNameExpression? {
|
||||
fun getReferenceExpression(element: PsiElement?): JetSimpleNameExpression? {
|
||||
return PsiTreeUtil.getParentOfType<JetSimpleNameExpression>(element, javaClass<JetSimpleNameExpression>())
|
||||
}
|
||||
|
||||
// given 'R.a.b' returns info for all three parts of the expression 'a', 'b', 'R'
|
||||
private fun getInfo(
|
||||
fun getInfo(
|
||||
referenceExpression: JetSimpleNameExpression,
|
||||
facet: AndroidFacet
|
||||
): AndroidResourceUtil.MyReferredResourceFieldInfo? {
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ import org.jetbrains.kotlin.types.TypeSubstitutor
|
||||
import org.jetbrains.kotlin.types.Variance
|
||||
import org.jetbrains.kotlin.types.substitutions.getCallableSubstitutor
|
||||
|
||||
private fun JetNamedDeclaration.getDeclarationBody(): JetElement? {
|
||||
fun JetNamedDeclaration.getDeclarationBody(): JetElement? {
|
||||
return when {
|
||||
this is JetClassOrObject -> getDelegationSpecifierList()
|
||||
this is JetPrimaryConstructor -> getContainingClassOrObject().getDelegationSpecifierList()
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
package org.jetbrains.kotlin.idea.highlighter.formatHtml
|
||||
|
||||
private fun formatHtml(html: String): String {
|
||||
fun formatHtml(html: String): String {
|
||||
var message = html
|
||||
fun wrapTagWithNewLines(tagName: String, isSubTag: Boolean) {
|
||||
val openTagPart = "<$tagName"
|
||||
|
||||
Reference in New Issue
Block a user