diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/ModifiersChecker.kt b/compiler/frontend/src/org/jetbrains/kotlin/resolve/ModifiersChecker.kt index d915c45872e..e218b6b8bac 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/ModifiersChecker.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/ModifiersChecker.kt @@ -85,7 +85,6 @@ public object ModifierCheckerCore { ) private val deprecatedParentTargetMap = mapOf>( - PRIVATE_KEYWORD to EnumSet.of(INTERFACE), INTERNAL_KEYWORD to EnumSet.of(INTERFACE), PROTECTED_KEYWORD to EnumSet.of(INTERFACE) ) diff --git a/compiler/testData/diagnostics/tests/AbstractInTrait.kt b/compiler/testData/diagnostics/tests/AbstractInTrait.kt index e58da290703..c7295d9f13b 100644 --- a/compiler/testData/diagnostics/tests/AbstractInTrait.kt +++ b/compiler/testData/diagnostics/tests/AbstractInTrait.kt @@ -7,10 +7,10 @@ interface MyTrait { abstract val a2: Int abstract val a3: Int = 1 - var b: Int - var b1: Int = 0 - abstract var b2: Int - abstract var b3: Int = 0 + var b: Int private set + var b1: Int = 0; private set + abstract var b2: Int private set + abstract var b3: Int = 0; private set var c: Int set(v: Int) { field = v } var c1: Int = 0; set(v: Int) { field = v } diff --git a/compiler/testData/diagnostics/tests/TraitWithConstructor.kt b/compiler/testData/diagnostics/tests/TraitWithConstructor.kt index eb88b6ab35d..063d9b65f1d 100644 --- a/compiler/testData/diagnostics/tests/TraitWithConstructor.kt +++ b/compiler/testData/diagnostics/tests/TraitWithConstructor.kt @@ -6,7 +6,7 @@ interface T1(val x: String) {} interface T2 constructor() {} -interface T3 constructor(a: Int) {} +interface T3 private constructor(a: Int) {} interface T4 { constructor(a: Int) { @@ -14,5 +14,5 @@ interface T4 { } } -interface T5 private () : T4 {} -interface T6 public : T5 {} \ No newline at end of file +interface T5 private () : T4 {} +interface T6 private : T5 {} \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/TraitWithConstructor.txt b/compiler/testData/diagnostics/tests/TraitWithConstructor.txt index 414821b49ba..5434725ffbc 100644 --- a/compiler/testData/diagnostics/tests/TraitWithConstructor.txt +++ b/compiler/testData/diagnostics/tests/TraitWithConstructor.txt @@ -24,7 +24,7 @@ public interface T2 { } public interface T3 { - public constructor T3(/*0*/ a: kotlin.Int) + private constructor T3(/*0*/ a: kotlin.Int) public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String @@ -45,7 +45,7 @@ public interface T5 : T4 { } public interface T6 : T5 { - public constructor T6() + private constructor T6() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String diff --git a/compiler/testData/diagnostics/tests/delegation/Delegation_MultipleDelegates.kt b/compiler/testData/diagnostics/tests/delegation/Delegation_MultipleDelegates.kt index c1576a5e6ab..26501f0de2e 100644 --- a/compiler/testData/diagnostics/tests/delegation/Delegation_MultipleDelegates.kt +++ b/compiler/testData/diagnostics/tests/delegation/Delegation_MultipleDelegates.kt @@ -1,7 +1,7 @@ // !DIAGNOSTICS: -CONFLICTING_JVM_DECLARATIONS interface One { public open fun foo() : Int - private fun boo() = 10 + private fun boo() = 10 } interface Two { public open fun foo() : Int diff --git a/compiler/testData/diagnostics/tests/inline/nonVirtualMembersWithInline.kt b/compiler/testData/diagnostics/tests/inline/nonVirtualMembersWithInline.kt index ff2118ffab2..d05ad876402 100644 --- a/compiler/testData/diagnostics/tests/inline/nonVirtualMembersWithInline.kt +++ b/compiler/testData/diagnostics/tests/inline/nonVirtualMembersWithInline.kt @@ -29,6 +29,7 @@ abstract class A { interface B { + inline private fun good1() {} inline public final fun good2() {} inline final fun good3() {} inline final fun good4() {} diff --git a/compiler/testData/diagnostics/tests/inline/nonVirtualMembersWithInline.txt b/compiler/testData/diagnostics/tests/inline/nonVirtualMembersWithInline.txt index 7113bc7bdd1..cc818703e09 100644 --- a/compiler/testData/diagnostics/tests/inline/nonVirtualMembersWithInline.txt +++ b/compiler/testData/diagnostics/tests/inline/nonVirtualMembersWithInline.txt @@ -23,6 +23,7 @@ public abstract class A { public interface B { public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + @kotlin.inline() private final fun good1(): kotlin.Unit @kotlin.inline() public final fun good2(): kotlin.Unit @kotlin.inline() public final fun good3(): kotlin.Unit @kotlin.inline() public final fun good4(): kotlin.Unit diff --git a/compiler/testData/diagnostics/tests/override/AllPrivateFromSuperTypes.kt b/compiler/testData/diagnostics/tests/override/AllPrivateFromSuperTypes.kt index 80f2eaa6f2a..e92b440e116 100644 --- a/compiler/testData/diagnostics/tests/override/AllPrivateFromSuperTypes.kt +++ b/compiler/testData/diagnostics/tests/override/AllPrivateFromSuperTypes.kt @@ -1,7 +1,7 @@ package test interface A { - private val a: String + private val a: String get() = "AAAA!" } diff --git a/compiler/testData/diagnostics/tests/variance/Visibility.kt b/compiler/testData/diagnostics/tests/variance/Visibility.kt index d63a1282833..04e2a29c45a 100644 --- a/compiler/testData/diagnostics/tests/variance/Visibility.kt +++ b/compiler/testData/diagnostics/tests/variance/Visibility.kt @@ -2,19 +2,19 @@ interface Test { val internal_val: I public val public_val: I protected val protected_val: I - private val private_val: I + private val private_val: I var interlan_private_set: O - private set + private set public var public_private_set: O - private set + private set protected var protected_private_set: O - private set - private var private_private_set: O - private set + private set + private var private_private_set: O + private set fun internal_fun(i: O) : I public fun public_fun(i: O) : I protected fun protected_fun(i: O) : I - private fun private_fun(i: O) : I + private fun private_fun(i: O) : I } \ No newline at end of file diff --git a/idea/testData/checker/Abstract.kt b/idea/testData/checker/Abstract.kt index b5314698fd8..c6f05487255 100644 --- a/idea/testData/checker/Abstract.kt +++ b/idea/testData/checker/Abstract.kt @@ -70,10 +70,10 @@ interface MyTrait { abstract val a2: Int abstract val a3: Int = 1 - var b: Int - var b1: Int = 0; - abstract var b2: Int - abstract var b3: Int = 0; + var b: Int private set + var b1: Int = 0; private set + abstract var b2: Int private set + abstract var b3: Int = 0; private set var c: Int set(v: Int) { field = v } var c1: Int = 0; set(v: Int) { field = v }