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