[FE 1.0] Report warning on non-deprecated overrides of deprecated members
Also don't propagate deprecation status to overrides after 1.7 ^KT-47902 Fixed
This commit is contained in:
+18
-6
@@ -8598,15 +8598,27 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("deprecatedInheritance.kt")
|
@TestMetadata("deprecatedInheritance_after.kt")
|
||||||
public void testDeprecatedInheritance() throws Exception {
|
public void testDeprecatedInheritance_after() throws Exception {
|
||||||
runTest("compiler/testData/diagnostics/tests/deprecated/deprecatedInheritance.kt");
|
runTest("compiler/testData/diagnostics/tests/deprecated/deprecatedInheritance_after.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("deprecatedPropertyInheritance.kt")
|
@TestMetadata("deprecatedInheritance_before.kt")
|
||||||
public void testDeprecatedPropertyInheritance() throws Exception {
|
public void testDeprecatedInheritance_before() throws Exception {
|
||||||
runTest("compiler/testData/diagnostics/tests/deprecated/deprecatedPropertyInheritance.kt");
|
runTest("compiler/testData/diagnostics/tests/deprecated/deprecatedInheritance_before.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("deprecatedPropertyInheritance_after.kt")
|
||||||
|
public void testDeprecatedPropertyInheritance_after() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/deprecated/deprecatedPropertyInheritance_after.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("deprecatedPropertyInheritance_before.kt")
|
||||||
|
public void testDeprecatedPropertyInheritance_before() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/deprecated/deprecatedPropertyInheritance_before.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
+18
-6
@@ -8598,15 +8598,27 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("deprecatedInheritance.kt")
|
@TestMetadata("deprecatedInheritance_after.kt")
|
||||||
public void testDeprecatedInheritance() throws Exception {
|
public void testDeprecatedInheritance_after() throws Exception {
|
||||||
runTest("compiler/testData/diagnostics/tests/deprecated/deprecatedInheritance.kt");
|
runTest("compiler/testData/diagnostics/tests/deprecated/deprecatedInheritance_after.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("deprecatedPropertyInheritance.kt")
|
@TestMetadata("deprecatedInheritance_before.kt")
|
||||||
public void testDeprecatedPropertyInheritance() throws Exception {
|
public void testDeprecatedInheritance_before() throws Exception {
|
||||||
runTest("compiler/testData/diagnostics/tests/deprecated/deprecatedPropertyInheritance.kt");
|
runTest("compiler/testData/diagnostics/tests/deprecated/deprecatedInheritance_before.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("deprecatedPropertyInheritance_after.kt")
|
||||||
|
public void testDeprecatedPropertyInheritance_after() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/deprecated/deprecatedPropertyInheritance_after.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("deprecatedPropertyInheritance_before.kt")
|
||||||
|
public void testDeprecatedPropertyInheritance_before() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/deprecated/deprecatedPropertyInheritance_before.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ import org.jetbrains.kotlin.resolve.VarianceConflictDiagnosticData;
|
|||||||
import org.jetbrains.kotlin.resolve.calls.inference.InferenceErrorData;
|
import org.jetbrains.kotlin.resolve.calls.inference.InferenceErrorData;
|
||||||
import org.jetbrains.kotlin.resolve.calls.model.ResolvedCall;
|
import org.jetbrains.kotlin.resolve.calls.model.ResolvedCall;
|
||||||
import org.jetbrains.kotlin.resolve.calls.tower.WrongResolutionToClassifier;
|
import org.jetbrains.kotlin.resolve.calls.tower.WrongResolutionToClassifier;
|
||||||
|
import org.jetbrains.kotlin.resolve.deprecation.DescriptorBasedDeprecation;
|
||||||
import org.jetbrains.kotlin.resolve.multiplatform.ExpectActualCompatibility.Incompatible;
|
import org.jetbrains.kotlin.resolve.multiplatform.ExpectActualCompatibility.Incompatible;
|
||||||
import org.jetbrains.kotlin.serialization.deserialization.IncompatibleVersionErrorData;
|
import org.jetbrains.kotlin.serialization.deserialization.IncompatibleVersionErrorData;
|
||||||
import org.jetbrains.kotlin.types.KotlinType;
|
import org.jetbrains.kotlin.types.KotlinType;
|
||||||
@@ -98,6 +99,8 @@ public interface Errors {
|
|||||||
VERSION_REQUIREMENT_DEPRECATION = DiagnosticFactory3.create(WARNING);
|
VERSION_REQUIREMENT_DEPRECATION = DiagnosticFactory3.create(WARNING);
|
||||||
DiagnosticFactory3<PsiElement, DeclarationDescriptor, VersionRequirement.Version, Pair<LanguageVersion, String>>
|
DiagnosticFactory3<PsiElement, DeclarationDescriptor, VersionRequirement.Version, Pair<LanguageVersion, String>>
|
||||||
VERSION_REQUIREMENT_DEPRECATION_ERROR = DiagnosticFactory3.create(ERROR);
|
VERSION_REQUIREMENT_DEPRECATION_ERROR = DiagnosticFactory3.create(ERROR);
|
||||||
|
// descriptor and deprecation infos are needed only for IDE quickfix for this warning
|
||||||
|
DiagnosticFactory3<KtNamedDeclaration, String, CallableMemberDescriptor, List<DescriptorBasedDeprecation>> OVERRIDE_DEPRECATION = DiagnosticFactory3.create(WARNING, DECLARATION_NAME);
|
||||||
|
|
||||||
DiagnosticFactory0<PsiElement> DEPRECATED_SINCE_KOTLIN_WITHOUT_DEPRECATED = DiagnosticFactory0.create(ERROR);
|
DiagnosticFactory0<PsiElement> DEPRECATED_SINCE_KOTLIN_WITHOUT_DEPRECATED = DiagnosticFactory0.create(ERROR);
|
||||||
DiagnosticFactory0<PsiElement> DEPRECATED_SINCE_KOTLIN_WITH_DEPRECATED_LEVEL = DiagnosticFactory0.create(ERROR);
|
DiagnosticFactory0<PsiElement> DEPRECATED_SINCE_KOTLIN_WITH_DEPRECATED_LEVEL = DiagnosticFactory0.create(ERROR);
|
||||||
|
|||||||
+2
@@ -394,6 +394,8 @@ public class DefaultErrorMessages {
|
|||||||
(obj, renderingContext) -> obj.equals(VersionRequirement.Version.INFINITY) ? "" : " is only available since Kotlin " + obj.asString() + " and",
|
(obj, renderingContext) -> obj.equals(VersionRequirement.Version.INFINITY) ? "" : " is only available since Kotlin " + obj.asString() + " and",
|
||||||
versionRequirementMessage);
|
versionRequirementMessage);
|
||||||
|
|
||||||
|
MAP.put(OVERRIDE_DEPRECATION, "This declaration overrides deprecated member but not marked as deprecated itself. {0}Please add @Deprecated annotation or suppress", TO_STRING, TO_STRING, TO_STRING);
|
||||||
|
|
||||||
MAP.put(DEPRECATED_SINCE_KOTLIN_WITHOUT_DEPRECATED, "DeprecatedSinceKotlin annotation can be used only together with Deprecated annotation");
|
MAP.put(DEPRECATED_SINCE_KOTLIN_WITHOUT_DEPRECATED, "DeprecatedSinceKotlin annotation can be used only together with Deprecated annotation");
|
||||||
MAP.put(DEPRECATED_SINCE_KOTLIN_WITH_DEPRECATED_LEVEL, "DeprecatedSinceKotlin annotation can be used only with unspecified deprecation level of Deprecated annotation");
|
MAP.put(DEPRECATED_SINCE_KOTLIN_WITH_DEPRECATED_LEVEL, "DeprecatedSinceKotlin annotation can be used only with unspecified deprecation level of Deprecated annotation");
|
||||||
MAP.put(DEPRECATED_SINCE_KOTLIN_WITH_UNORDERED_VERSIONS, "Values of DeprecatedSinceKotlin annotation should be ordered so 'warningSince' <= 'errorSince' <= 'hiddenSince' if specified");
|
MAP.put(DEPRECATED_SINCE_KOTLIN_WITH_UNORDERED_VERSIONS, "Values of DeprecatedSinceKotlin annotation should be ordered so 'warningSince' <= 'errorSince' <= 'hiddenSince' if specified");
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ private val DEFAULT_DECLARATION_CHECKERS = listOf(
|
|||||||
TrailingCommaDeclarationChecker,
|
TrailingCommaDeclarationChecker,
|
||||||
MissingDependencySupertypeChecker.ForDeclarations,
|
MissingDependencySupertypeChecker.ForDeclarations,
|
||||||
FunInterfaceDeclarationChecker(),
|
FunInterfaceDeclarationChecker(),
|
||||||
|
DeprecationInheritanceChecker,
|
||||||
DeprecatedSinceKotlinAnnotationChecker,
|
DeprecatedSinceKotlinAnnotationChecker,
|
||||||
ContractDescriptionBlockChecker,
|
ContractDescriptionBlockChecker,
|
||||||
PrivateInlineFunctionsReturningAnonymousObjectsChecker,
|
PrivateInlineFunctionsReturningAnonymousObjectsChecker,
|
||||||
|
|||||||
+26
@@ -0,0 +1,26 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||||
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.jetbrains.kotlin.resolve.checkers
|
||||||
|
|
||||||
|
import org.jetbrains.kotlin.config.LanguageFeature.StopPropagatingDeprecationThroughOverrides
|
||||||
|
import org.jetbrains.kotlin.descriptors.DeclarationDescriptor
|
||||||
|
import org.jetbrains.kotlin.diagnostics.Errors
|
||||||
|
import org.jetbrains.kotlin.psi.KtDeclaration
|
||||||
|
import org.jetbrains.kotlin.psi.KtNamedDeclaration
|
||||||
|
|
||||||
|
object DeprecationInheritanceChecker : DeclarationChecker {
|
||||||
|
override fun check(declaration: KtDeclaration, descriptor: DeclarationDescriptor, context: DeclarationCheckerContext) {
|
||||||
|
if (declaration !is KtNamedDeclaration) return
|
||||||
|
val deprecationResolver = context.deprecationResolver
|
||||||
|
if (!deprecationResolver.areDeprecationsInheritedFromOverriden(descriptor)) return
|
||||||
|
val (deprecations, message) = if (context.languageVersionSettings.supportsFeature(StopPropagatingDeprecationThroughOverrides)) {
|
||||||
|
deprecationResolver.getHiddenDeprecationsFromOverriden(descriptor) to ""
|
||||||
|
} else {
|
||||||
|
deprecationResolver.getDeprecations(descriptor) to "This deprecation won't be inherited in kotlin 1.7. "
|
||||||
|
}
|
||||||
|
context.trace.report(Errors.OVERRIDE_DEPRECATION.on(declaration, message, descriptor, deprecations))
|
||||||
|
}
|
||||||
|
}
|
||||||
+42
-11
@@ -7,10 +7,7 @@ package org.jetbrains.kotlin.resolve.deprecation
|
|||||||
|
|
||||||
import org.jetbrains.kotlin.builtins.KotlinBuiltIns
|
import org.jetbrains.kotlin.builtins.KotlinBuiltIns
|
||||||
import org.jetbrains.kotlin.builtins.StandardNames
|
import org.jetbrains.kotlin.builtins.StandardNames
|
||||||
import org.jetbrains.kotlin.config.ApiVersion
|
import org.jetbrains.kotlin.config.*
|
||||||
import org.jetbrains.kotlin.config.KotlinCompilerVersion
|
|
||||||
import org.jetbrains.kotlin.config.LanguageVersionSettings
|
|
||||||
import org.jetbrains.kotlin.config.MavenComparableVersion
|
|
||||||
import org.jetbrains.kotlin.descriptors.*
|
import org.jetbrains.kotlin.descriptors.*
|
||||||
import org.jetbrains.kotlin.descriptors.impl.DescriptorDerivedFromTypeAlias
|
import org.jetbrains.kotlin.descriptors.impl.DescriptorDerivedFromTypeAlias
|
||||||
import org.jetbrains.kotlin.descriptors.impl.TypeAliasConstructorDescriptor
|
import org.jetbrains.kotlin.descriptors.impl.TypeAliasConstructorDescriptor
|
||||||
@@ -27,23 +24,46 @@ import org.jetbrains.kotlin.resolve.checkers.ExperimentalUsageChecker
|
|||||||
import org.jetbrains.kotlin.resolve.descriptorUtil.fqNameSafe
|
import org.jetbrains.kotlin.resolve.descriptorUtil.fqNameSafe
|
||||||
import org.jetbrains.kotlin.serialization.deserialization.descriptors.DeserializedClassDescriptor
|
import org.jetbrains.kotlin.serialization.deserialization.descriptors.DeserializedClassDescriptor
|
||||||
import org.jetbrains.kotlin.serialization.deserialization.descriptors.DeserializedMemberDescriptor
|
import org.jetbrains.kotlin.serialization.deserialization.descriptors.DeserializedMemberDescriptor
|
||||||
|
import org.jetbrains.kotlin.storage.MemoizedFunctionToNotNull
|
||||||
import org.jetbrains.kotlin.storage.StorageManager
|
import org.jetbrains.kotlin.storage.StorageManager
|
||||||
import org.jetbrains.kotlin.types.KotlinType
|
import org.jetbrains.kotlin.types.KotlinType
|
||||||
import org.jetbrains.kotlin.types.TypeUtils
|
import org.jetbrains.kotlin.types.TypeUtils
|
||||||
import org.jetbrains.kotlin.utils.SmartList
|
import org.jetbrains.kotlin.utils.SmartList
|
||||||
import org.jetbrains.kotlin.utils.addToStdlib.safeAs
|
import org.jetbrains.kotlin.utils.addToStdlib.safeAs
|
||||||
|
import kotlin.contracts.ExperimentalContracts
|
||||||
|
import kotlin.contracts.contract
|
||||||
|
|
||||||
class DeprecationResolver(
|
class DeprecationResolver(
|
||||||
storageManager: StorageManager,
|
storageManager: StorageManager,
|
||||||
private val languageVersionSettings: LanguageVersionSettings,
|
private val languageVersionSettings: LanguageVersionSettings,
|
||||||
private val deprecationSettings: DeprecationSettings
|
private val deprecationSettings: DeprecationSettings
|
||||||
) {
|
) {
|
||||||
private val deprecations = storageManager.createMemoizedFunction { descriptor: DeclarationDescriptor ->
|
private val deprecations: MemoizedFunctionToNotNull<DeclarationDescriptor, DeprecationInfo> =
|
||||||
val deprecations = descriptor.getOwnDeprecations()
|
storageManager.createMemoizedFunction { descriptor ->
|
||||||
when {
|
val deprecations = descriptor.getOwnDeprecations()
|
||||||
deprecations.isNotEmpty() -> deprecations
|
when {
|
||||||
descriptor is CallableMemberDescriptor -> listOfNotNull(deprecationByOverridden(descriptor))
|
deprecations.isNotEmpty() -> DeprecationInfo(deprecations, hasInheritedDeprecations = false)
|
||||||
else -> emptyList()
|
descriptor is CallableMemberDescriptor -> {
|
||||||
|
val inheritedDeprecations = listOfNotNull(deprecationByOverridden(descriptor))
|
||||||
|
when (inheritedDeprecations.isNotEmpty()) {
|
||||||
|
true -> when (languageVersionSettings.supportsFeature(LanguageFeature.StopPropagatingDeprecationThroughOverrides)) {
|
||||||
|
true -> DeprecationInfo(emptyList(), hasInheritedDeprecations = true, inheritedDeprecations)
|
||||||
|
false -> DeprecationInfo(inheritedDeprecations, hasInheritedDeprecations = true)
|
||||||
|
}
|
||||||
|
false -> DeprecationInfo.EMPTY
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else -> DeprecationInfo.EMPTY
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private data class DeprecationInfo(
|
||||||
|
val deprecations: List<DescriptorBasedDeprecation>,
|
||||||
|
val hasInheritedDeprecations: Boolean,
|
||||||
|
val hiddenInheritedDeprecations: List<DescriptorBasedDeprecation> = emptyList()
|
||||||
|
) {
|
||||||
|
companion object {
|
||||||
|
val EMPTY = DeprecationInfo(emptyList(), hasInheritedDeprecations = false, emptyList())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -52,7 +72,18 @@ class DeprecationResolver(
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun getDeprecations(descriptor: DeclarationDescriptor): List<DescriptorBasedDeprecation> =
|
fun getDeprecations(descriptor: DeclarationDescriptor): List<DescriptorBasedDeprecation> =
|
||||||
deprecations(descriptor.original)
|
deprecations(descriptor.original).deprecations
|
||||||
|
|
||||||
|
@OptIn(ExperimentalContracts::class)
|
||||||
|
fun areDeprecationsInheritedFromOverriden(descriptor: DeclarationDescriptor): Boolean {
|
||||||
|
contract {
|
||||||
|
returns(true) implies (descriptor is CallableMemberDescriptor)
|
||||||
|
}
|
||||||
|
return deprecations(descriptor.original).hasInheritedDeprecations
|
||||||
|
}
|
||||||
|
|
||||||
|
fun getHiddenDeprecationsFromOverriden(descriptor: DeclarationDescriptor): List<DescriptorBasedDeprecation> =
|
||||||
|
deprecations(descriptor.original).hiddenInheritedDeprecations
|
||||||
|
|
||||||
fun isDeprecatedHidden(descriptor: DeclarationDescriptor): Boolean =
|
fun isDeprecatedHidden(descriptor: DeclarationDescriptor): Boolean =
|
||||||
getDeprecations(descriptor).any { it.deprecationLevel == DeprecationLevelValue.HIDDEN }
|
getDeprecations(descriptor).any { it.deprecationLevel == DeprecationLevelValue.HIDDEN }
|
||||||
|
|||||||
+1
@@ -1,3 +1,4 @@
|
|||||||
|
// LANGUAGE: +StopPropagatingDeprecationThroughOverrides
|
||||||
package foo
|
package foo
|
||||||
|
|
||||||
interface WarningDeprecated {
|
interface WarningDeprecated {
|
||||||
+141
@@ -0,0 +1,141 @@
|
|||||||
|
// LANGUAGE: +StopPropagatingDeprecationThroughOverrides
|
||||||
|
package foo
|
||||||
|
|
||||||
|
interface WarningDeprecated {
|
||||||
|
@Deprecated("", level = DeprecationLevel.WARNING)
|
||||||
|
fun f() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ErrorDeprecated {
|
||||||
|
@Deprecated("", level = DeprecationLevel.ERROR)
|
||||||
|
fun f() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
interface HiddenDeprecated {
|
||||||
|
@Deprecated("", level = DeprecationLevel.HIDDEN)
|
||||||
|
fun f() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
interface NotDeprecated {
|
||||||
|
fun f() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
open class WE : WarningDeprecated, ErrorDeprecated {
|
||||||
|
override fun <!OVERRIDE_DEPRECATION!>f<!>() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
open class WH : WarningDeprecated, HiddenDeprecated {
|
||||||
|
override fun <!OVERRIDE_DEPRECATION!>f<!>() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
open class EH : ErrorDeprecated, HiddenDeprecated {
|
||||||
|
override fun <!OVERRIDE_DEPRECATION!>f<!>() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
open class NW : WarningDeprecated, NotDeprecated {
|
||||||
|
override fun f() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
open class NE : ErrorDeprecated, NotDeprecated {
|
||||||
|
override fun f() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
open class NH : HiddenDeprecated, NotDeprecated {
|
||||||
|
override fun f() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
open class WEH: WarningDeprecated, ErrorDeprecated, HiddenDeprecated {
|
||||||
|
override fun <!OVERRIDE_DEPRECATION!>f<!>() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
open class NWEH: NotDeprecated, WarningDeprecated, ErrorDeprecated, HiddenDeprecated {
|
||||||
|
override fun f() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class WE2: WE()
|
||||||
|
|
||||||
|
<!MANY_IMPL_MEMBER_NOT_IMPLEMENTED!>class NWE2<!>: WE(), NotDeprecated
|
||||||
|
|
||||||
|
class NWE3: WE(), NotDeprecated {
|
||||||
|
override fun f() {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
interface E2: ErrorDeprecated
|
||||||
|
interface W2: WarningDeprecated
|
||||||
|
|
||||||
|
interface EW2: E2, W2 {
|
||||||
|
override fun <!OVERRIDE_DEPRECATION!>f<!>() {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
interface HEW2: EW2, HiddenDeprecated {
|
||||||
|
override fun <!OVERRIDE_DEPRECATION!>f<!>() {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ExplicitError: HEW2 {
|
||||||
|
@Deprecated("", level = DeprecationLevel.ERROR)
|
||||||
|
override fun f() {
|
||||||
|
super.f()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun use(
|
||||||
|
wd: WarningDeprecated, ed: ErrorDeprecated, hd: HiddenDeprecated,
|
||||||
|
we: WE, wh: WH, eh: EH, nw: NW, ne: NE, nh: NH,
|
||||||
|
weh: WEH, nweh: NWEH,
|
||||||
|
we2: WE2, nwe2: NWE2, nwe3: NWE3,
|
||||||
|
e2: E2, w2: W2, ew2: EW2, hew2: HEW2,
|
||||||
|
explicitError: ExplicitError
|
||||||
|
) {
|
||||||
|
wd.<!DEPRECATION!>f<!>()
|
||||||
|
ed.<!DEPRECATION_ERROR!>f<!>()
|
||||||
|
hd.<!UNRESOLVED_REFERENCE!>f<!>()
|
||||||
|
|
||||||
|
we.f()
|
||||||
|
wh.f()
|
||||||
|
eh.f()
|
||||||
|
|
||||||
|
nw.f()
|
||||||
|
ne.f()
|
||||||
|
nh.f()
|
||||||
|
|
||||||
|
weh.f()
|
||||||
|
nweh.f()
|
||||||
|
|
||||||
|
we2.f()
|
||||||
|
nwe2.f()
|
||||||
|
nwe3.f()
|
||||||
|
|
||||||
|
e2.<!DEPRECATION_ERROR!>f<!>()
|
||||||
|
w2.<!DEPRECATION!>f<!>()
|
||||||
|
ew2.f()
|
||||||
|
hew2.f()
|
||||||
|
|
||||||
|
explicitError.<!DEPRECATION_ERROR!>f<!>()
|
||||||
|
}
|
||||||
+11
-10
@@ -1,3 +1,4 @@
|
|||||||
|
// LANGUAGE: -StopPropagatingDeprecationThroughOverrides
|
||||||
package foo
|
package foo
|
||||||
|
|
||||||
interface WarningDeprecated {
|
interface WarningDeprecated {
|
||||||
@@ -100,7 +101,7 @@ interface HEW2: EW2, HiddenDeprecated {
|
|||||||
interface ExplicitError: HEW2 {
|
interface ExplicitError: HEW2 {
|
||||||
@Deprecated("", level = DeprecationLevel.ERROR)
|
@Deprecated("", level = DeprecationLevel.ERROR)
|
||||||
override fun f() {
|
override fun f() {
|
||||||
super.<!DEPRECATION!>f<!>()
|
super.f()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -114,27 +115,27 @@ fun use(
|
|||||||
) {
|
) {
|
||||||
wd.<!DEPRECATION!>f<!>()
|
wd.<!DEPRECATION!>f<!>()
|
||||||
ed.<!DEPRECATION_ERROR!>f<!>()
|
ed.<!DEPRECATION_ERROR!>f<!>()
|
||||||
hd.<!UNRESOLVED_REFERENCE!>f<!>()
|
hd.<!INVISIBLE_REFERENCE!>f<!>()
|
||||||
|
|
||||||
we.<!DEPRECATION!>f<!>()
|
we.f()
|
||||||
wh.<!DEPRECATION!>f<!>()
|
wh.f()
|
||||||
eh.<!DEPRECATION_ERROR!>f<!>()
|
eh.f()
|
||||||
|
|
||||||
nw.f()
|
nw.f()
|
||||||
ne.f()
|
ne.f()
|
||||||
nh.f()
|
nh.f()
|
||||||
|
|
||||||
weh.<!DEPRECATION!>f<!>()
|
weh.f()
|
||||||
nweh.f()
|
nweh.f()
|
||||||
|
|
||||||
we2.<!DEPRECATION!>f<!>()
|
we2.f()
|
||||||
nwe2.f()
|
nwe2.f()
|
||||||
nwe3.f()
|
nwe3.f()
|
||||||
|
|
||||||
e2.<!DEPRECATION_ERROR!>f<!>()
|
e2.<!DEPRECATION_ERROR!>f<!>()
|
||||||
w2.<!DEPRECATION!>f<!>()
|
w2.<!DEPRECATION!>f<!>()
|
||||||
ew2.<!DEPRECATION!>f<!>()
|
ew2.f()
|
||||||
hew2.<!DEPRECATION!>f<!>()
|
hew2.f()
|
||||||
|
|
||||||
explicitError.<!DEPRECATION_ERROR!>f<!>()
|
explicitError.<!DEPRECATION_ERROR!>f<!>()
|
||||||
}
|
}
|
||||||
+141
@@ -0,0 +1,141 @@
|
|||||||
|
// LANGUAGE: -StopPropagatingDeprecationThroughOverrides
|
||||||
|
package foo
|
||||||
|
|
||||||
|
interface WarningDeprecated {
|
||||||
|
@Deprecated("", level = DeprecationLevel.WARNING)
|
||||||
|
fun f() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ErrorDeprecated {
|
||||||
|
@Deprecated("", level = DeprecationLevel.ERROR)
|
||||||
|
fun f() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
interface HiddenDeprecated {
|
||||||
|
@Deprecated("", level = DeprecationLevel.HIDDEN)
|
||||||
|
fun f() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
interface NotDeprecated {
|
||||||
|
fun f() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
open class WE : WarningDeprecated, ErrorDeprecated {
|
||||||
|
override fun <!OVERRIDE_DEPRECATION!>f<!>() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
open class WH : WarningDeprecated, HiddenDeprecated {
|
||||||
|
override fun <!OVERRIDE_DEPRECATION!>f<!>() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
open class EH : ErrorDeprecated, HiddenDeprecated {
|
||||||
|
override fun <!OVERRIDE_DEPRECATION!>f<!>() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
open class NW : WarningDeprecated, NotDeprecated {
|
||||||
|
override fun f() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
open class NE : ErrorDeprecated, NotDeprecated {
|
||||||
|
override fun f() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
open class NH : HiddenDeprecated, NotDeprecated {
|
||||||
|
override fun f() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
open class WEH: WarningDeprecated, ErrorDeprecated, HiddenDeprecated {
|
||||||
|
override fun <!OVERRIDE_DEPRECATION!>f<!>() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
open class NWEH: NotDeprecated, WarningDeprecated, ErrorDeprecated, HiddenDeprecated {
|
||||||
|
override fun f() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class WE2: WE()
|
||||||
|
|
||||||
|
<!MANY_IMPL_MEMBER_NOT_IMPLEMENTED!>class NWE2<!>: WE(), NotDeprecated
|
||||||
|
|
||||||
|
class NWE3: WE(), NotDeprecated {
|
||||||
|
override fun f() {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
interface E2: ErrorDeprecated
|
||||||
|
interface W2: WarningDeprecated
|
||||||
|
|
||||||
|
interface EW2: E2, W2 {
|
||||||
|
override fun <!OVERRIDE_DEPRECATION!>f<!>() {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
interface HEW2: EW2, HiddenDeprecated {
|
||||||
|
override fun <!OVERRIDE_DEPRECATION!>f<!>() {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ExplicitError: HEW2 {
|
||||||
|
@Deprecated("", level = DeprecationLevel.ERROR)
|
||||||
|
override fun f() {
|
||||||
|
super.<!DEPRECATION!>f<!>()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun use(
|
||||||
|
wd: WarningDeprecated, ed: ErrorDeprecated, hd: HiddenDeprecated,
|
||||||
|
we: WE, wh: WH, eh: EH, nw: NW, ne: NE, nh: NH,
|
||||||
|
weh: WEH, nweh: NWEH,
|
||||||
|
we2: WE2, nwe2: NWE2, nwe3: NWE3,
|
||||||
|
e2: E2, w2: W2, ew2: EW2, hew2: HEW2,
|
||||||
|
explicitError: ExplicitError
|
||||||
|
) {
|
||||||
|
wd.<!DEPRECATION!>f<!>()
|
||||||
|
ed.<!DEPRECATION_ERROR!>f<!>()
|
||||||
|
hd.<!UNRESOLVED_REFERENCE!>f<!>()
|
||||||
|
|
||||||
|
we.<!DEPRECATION!>f<!>()
|
||||||
|
wh.<!DEPRECATION!>f<!>()
|
||||||
|
eh.<!DEPRECATION_ERROR!>f<!>()
|
||||||
|
|
||||||
|
nw.f()
|
||||||
|
ne.f()
|
||||||
|
nh.f()
|
||||||
|
|
||||||
|
weh.<!DEPRECATION!>f<!>()
|
||||||
|
nweh.f()
|
||||||
|
|
||||||
|
we2.<!DEPRECATION!>f<!>()
|
||||||
|
nwe2.f()
|
||||||
|
nwe3.f()
|
||||||
|
|
||||||
|
e2.<!DEPRECATION_ERROR!>f<!>()
|
||||||
|
w2.<!DEPRECATION!>f<!>()
|
||||||
|
ew2.<!DEPRECATION!>f<!>()
|
||||||
|
hew2.<!DEPRECATION!>f<!>()
|
||||||
|
|
||||||
|
explicitError.<!DEPRECATION_ERROR!>f<!>()
|
||||||
|
}
|
||||||
+156
@@ -0,0 +1,156 @@
|
|||||||
|
package
|
||||||
|
|
||||||
|
package foo {
|
||||||
|
public fun use(/*0*/ wd: foo.WarningDeprecated, /*1*/ ed: foo.ErrorDeprecated, /*2*/ hd: foo.HiddenDeprecated, /*3*/ we: foo.WE, /*4*/ wh: foo.WH, /*5*/ eh: foo.EH, /*6*/ nw: foo.NW, /*7*/ ne: foo.NE, /*8*/ nh: foo.NH, /*9*/ weh: foo.WEH, /*10*/ nweh: foo.NWEH, /*11*/ we2: foo.WE2, /*12*/ nwe2: foo.NWE2, /*13*/ nwe3: foo.NWE3, /*14*/ e2: foo.E2, /*15*/ w2: foo.W2, /*16*/ ew2: foo.EW2, /*17*/ hew2: foo.HEW2, /*18*/ explicitError: foo.ExplicitError): kotlin.Unit
|
||||||
|
|
||||||
|
public interface E2 : foo.ErrorDeprecated {
|
||||||
|
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
@kotlin.Deprecated(level = DeprecationLevel.ERROR, message = "") public open override /*1*/ /*fake_override*/ fun f(): kotlin.Unit
|
||||||
|
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
|
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
}
|
||||||
|
|
||||||
|
public open class EH : foo.ErrorDeprecated, foo.HiddenDeprecated {
|
||||||
|
public constructor EH()
|
||||||
|
public open override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
public open override /*2*/ fun f(): kotlin.Unit
|
||||||
|
public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
|
public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface EW2 : foo.E2, foo.W2 {
|
||||||
|
public open override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
public open override /*2*/ fun f(): kotlin.Unit
|
||||||
|
public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
|
public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface ErrorDeprecated {
|
||||||
|
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
@kotlin.Deprecated(level = DeprecationLevel.ERROR, message = "") public open fun f(): kotlin.Unit
|
||||||
|
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
|
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface ExplicitError : foo.HEW2 {
|
||||||
|
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
@kotlin.Deprecated(level = DeprecationLevel.ERROR, message = "") public open override /*1*/ fun f(): kotlin.Unit
|
||||||
|
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
|
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface HEW2 : foo.EW2, foo.HiddenDeprecated {
|
||||||
|
public open override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
public open override /*2*/ fun f(): kotlin.Unit
|
||||||
|
public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
|
public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface HiddenDeprecated {
|
||||||
|
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
@kotlin.Deprecated(level = DeprecationLevel.HIDDEN, message = "") public open fun f(): kotlin.Unit
|
||||||
|
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
|
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
}
|
||||||
|
|
||||||
|
public open class NE : foo.ErrorDeprecated, foo.NotDeprecated {
|
||||||
|
public constructor NE()
|
||||||
|
public open override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
public open override /*2*/ fun f(): kotlin.Unit
|
||||||
|
public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
|
public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
}
|
||||||
|
|
||||||
|
public open class NH : foo.HiddenDeprecated, foo.NotDeprecated {
|
||||||
|
public constructor NH()
|
||||||
|
public open override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
public open override /*2*/ fun f(): kotlin.Unit
|
||||||
|
public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
|
public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
}
|
||||||
|
|
||||||
|
public open class NW : foo.WarningDeprecated, foo.NotDeprecated {
|
||||||
|
public constructor NW()
|
||||||
|
public open override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
public open override /*2*/ fun f(): kotlin.Unit
|
||||||
|
public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
|
public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class NWE2 : foo.WE, foo.NotDeprecated {
|
||||||
|
public constructor NWE2()
|
||||||
|
public open override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
public open override /*2*/ /*fake_override*/ fun f(): kotlin.Unit
|
||||||
|
public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
|
public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class NWE3 : foo.WE, foo.NotDeprecated {
|
||||||
|
public constructor NWE3()
|
||||||
|
public open override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
public open override /*2*/ fun f(): kotlin.Unit
|
||||||
|
public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
|
public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
}
|
||||||
|
|
||||||
|
public open class NWEH : foo.NotDeprecated, foo.WarningDeprecated, foo.ErrorDeprecated, foo.HiddenDeprecated {
|
||||||
|
public constructor NWEH()
|
||||||
|
public open override /*4*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
public open override /*4*/ fun f(): kotlin.Unit
|
||||||
|
public open override /*4*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
|
public open override /*4*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface NotDeprecated {
|
||||||
|
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
public open fun f(): kotlin.Unit
|
||||||
|
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
|
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface W2 : foo.WarningDeprecated {
|
||||||
|
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
@kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "") public open override /*1*/ /*fake_override*/ fun f(): kotlin.Unit
|
||||||
|
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
|
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
}
|
||||||
|
|
||||||
|
public open class WE : foo.WarningDeprecated, foo.ErrorDeprecated {
|
||||||
|
public constructor WE()
|
||||||
|
public open override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
public open override /*2*/ fun f(): kotlin.Unit
|
||||||
|
public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
|
public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class WE2 : foo.WE {
|
||||||
|
public constructor WE2()
|
||||||
|
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
public open override /*1*/ /*fake_override*/ fun f(): kotlin.Unit
|
||||||
|
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
|
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
}
|
||||||
|
|
||||||
|
public open class WEH : foo.WarningDeprecated, foo.ErrorDeprecated, foo.HiddenDeprecated {
|
||||||
|
public constructor WEH()
|
||||||
|
public open override /*3*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
public open override /*3*/ fun f(): kotlin.Unit
|
||||||
|
public open override /*3*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
|
public open override /*3*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
}
|
||||||
|
|
||||||
|
public open class WH : foo.WarningDeprecated, foo.HiddenDeprecated {
|
||||||
|
public constructor WH()
|
||||||
|
public open override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
public open override /*2*/ fun f(): kotlin.Unit
|
||||||
|
public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
|
public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface WarningDeprecated {
|
||||||
|
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
@kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "") public open fun f(): kotlin.Unit
|
||||||
|
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
|
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
}
|
||||||
|
}
|
||||||
+1
@@ -1,3 +1,4 @@
|
|||||||
|
// LANGUAGE: +StopPropagatingDeprecationThroughOverrides
|
||||||
package foo
|
package foo
|
||||||
|
|
||||||
interface HiddenDeprecated {
|
interface HiddenDeprecated {
|
||||||
+136
@@ -0,0 +1,136 @@
|
|||||||
|
// LANGUAGE: +StopPropagatingDeprecationThroughOverrides
|
||||||
|
package foo
|
||||||
|
|
||||||
|
interface HiddenDeprecated {
|
||||||
|
@Deprecated("", level = DeprecationLevel.HIDDEN)
|
||||||
|
var p: Int
|
||||||
|
}
|
||||||
|
|
||||||
|
interface NoDeprecation {
|
||||||
|
var p: Int
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
open class WarningDeprecated {
|
||||||
|
@Deprecated("", level = DeprecationLevel.WARNING)
|
||||||
|
open var p: Int = 3
|
||||||
|
}
|
||||||
|
|
||||||
|
open class ErrorDeprecated {
|
||||||
|
@Deprecated("", level = DeprecationLevel.ERROR)
|
||||||
|
open var p: Int = 3
|
||||||
|
}
|
||||||
|
|
||||||
|
open class GetterDeprecated {
|
||||||
|
open var p: Int = 3
|
||||||
|
@Deprecated("") get
|
||||||
|
}
|
||||||
|
|
||||||
|
open class SetterDeprecated {
|
||||||
|
open var p: Int = 3
|
||||||
|
@Deprecated("") set
|
||||||
|
}
|
||||||
|
|
||||||
|
class WD: WarningDeprecated() {
|
||||||
|
override var <!OVERRIDE_DEPRECATION!>p<!>: Int
|
||||||
|
get() = 3
|
||||||
|
set(value) {}
|
||||||
|
}
|
||||||
|
|
||||||
|
class ED: ErrorDeprecated() {
|
||||||
|
override var <!OVERRIDE_DEPRECATION!>p<!>: Int
|
||||||
|
get() = 3
|
||||||
|
set(value) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class GD: GetterDeprecated() {
|
||||||
|
override var p: Int
|
||||||
|
get() = 3
|
||||||
|
set(value) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class SD: SetterDeprecated() {
|
||||||
|
override var p: Int
|
||||||
|
get() = 3
|
||||||
|
set(value) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class SDH: SetterDeprecated(), HiddenDeprecated {
|
||||||
|
override var p: Int
|
||||||
|
get() = 3
|
||||||
|
set(value) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class EDH: ErrorDeprecated(), HiddenDeprecated {
|
||||||
|
override var <!OVERRIDE_DEPRECATION!>p<!>: Int
|
||||||
|
get() = 3
|
||||||
|
set(value) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class NED: ErrorDeprecated(), NoDeprecation {
|
||||||
|
override var p: Int
|
||||||
|
get() = 3
|
||||||
|
set(value) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class Diff {
|
||||||
|
@Deprecated("", level = DeprecationLevel.WARNING)
|
||||||
|
var p: Int
|
||||||
|
@Deprecated("", level = DeprecationLevel.ERROR) get() = 3
|
||||||
|
@Deprecated("", level = DeprecationLevel.HIDDEN) set(value) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun use(
|
||||||
|
warningDeprecated: WarningDeprecated, errorDeprecated: ErrorDeprecated, setterDeprecated: SetterDeprecated,
|
||||||
|
getterDeprecated: GetterDeprecated, hiddenDeprecated: HiddenDeprecated,
|
||||||
|
wd: WD, ed: ED, gd: GD, sd: SD,
|
||||||
|
sdh: SDH, edh: EDH, ned: NED,
|
||||||
|
diff: Diff
|
||||||
|
) {
|
||||||
|
warningDeprecated.<!DEPRECATION!>p<!>
|
||||||
|
warningDeprecated.<!DEPRECATION!>p<!> = 1
|
||||||
|
|
||||||
|
errorDeprecated.<!DEPRECATION_ERROR!>p<!>
|
||||||
|
errorDeprecated.<!DEPRECATION_ERROR!>p<!> = 1
|
||||||
|
|
||||||
|
getterDeprecated.<!DEPRECATION!>p<!>
|
||||||
|
getterDeprecated.p = 1
|
||||||
|
|
||||||
|
setterDeprecated.p
|
||||||
|
setterDeprecated.<!DEPRECATION!>p<!> = 1
|
||||||
|
|
||||||
|
hiddenDeprecated.<!UNRESOLVED_REFERENCE!>p<!>
|
||||||
|
hiddenDeprecated.<!UNRESOLVED_REFERENCE!>p<!> = 1
|
||||||
|
|
||||||
|
wd.p
|
||||||
|
wd.p = 1
|
||||||
|
|
||||||
|
ed.p
|
||||||
|
ed.p = 1
|
||||||
|
|
||||||
|
gd.p
|
||||||
|
gd.p = 1
|
||||||
|
|
||||||
|
sd.p
|
||||||
|
sd.p = 1
|
||||||
|
|
||||||
|
sdh.p
|
||||||
|
sdh.p = 1
|
||||||
|
|
||||||
|
edh.p
|
||||||
|
edh.p = 1
|
||||||
|
|
||||||
|
ned.p
|
||||||
|
ned.p = 1
|
||||||
|
|
||||||
|
diff.<!DEPRECATION!>p<!>
|
||||||
|
diff.<!DEPRECATION, DEPRECATION_ERROR!>p<!> = 1
|
||||||
|
}
|
||||||
+136
@@ -0,0 +1,136 @@
|
|||||||
|
// LANGUAGE: -StopPropagatingDeprecationThroughOverrides
|
||||||
|
package foo
|
||||||
|
|
||||||
|
interface HiddenDeprecated {
|
||||||
|
@Deprecated("", level = DeprecationLevel.HIDDEN)
|
||||||
|
var p: Int
|
||||||
|
}
|
||||||
|
|
||||||
|
interface NoDeprecation {
|
||||||
|
var p: Int
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
open class WarningDeprecated {
|
||||||
|
@Deprecated("", level = DeprecationLevel.WARNING)
|
||||||
|
open var p: Int = 3
|
||||||
|
}
|
||||||
|
|
||||||
|
open class ErrorDeprecated {
|
||||||
|
@Deprecated("", level = DeprecationLevel.ERROR)
|
||||||
|
open var p: Int = 3
|
||||||
|
}
|
||||||
|
|
||||||
|
open class GetterDeprecated {
|
||||||
|
open var p: Int = 3
|
||||||
|
@Deprecated("") get
|
||||||
|
}
|
||||||
|
|
||||||
|
open class SetterDeprecated {
|
||||||
|
open var p: Int = 3
|
||||||
|
@Deprecated("") set
|
||||||
|
}
|
||||||
|
|
||||||
|
class WD: WarningDeprecated() {
|
||||||
|
override var p: Int
|
||||||
|
get() = 3
|
||||||
|
set(value) {}
|
||||||
|
}
|
||||||
|
|
||||||
|
class ED: ErrorDeprecated() {
|
||||||
|
override var p: Int
|
||||||
|
get() = 3
|
||||||
|
set(value) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class GD: GetterDeprecated() {
|
||||||
|
override var p: Int
|
||||||
|
get() = 3
|
||||||
|
set(value) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class SD: SetterDeprecated() {
|
||||||
|
override var p: Int
|
||||||
|
get() = 3
|
||||||
|
set(value) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class SDH: SetterDeprecated(), HiddenDeprecated {
|
||||||
|
override var p: Int
|
||||||
|
get() = 3
|
||||||
|
set(value) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class EDH: ErrorDeprecated(), HiddenDeprecated {
|
||||||
|
override var p: Int
|
||||||
|
get() = 3
|
||||||
|
set(value) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class NED: ErrorDeprecated(), NoDeprecation {
|
||||||
|
override var p: Int
|
||||||
|
get() = 3
|
||||||
|
set(value) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class Diff {
|
||||||
|
@Deprecated("", level = DeprecationLevel.WARNING)
|
||||||
|
var p: Int
|
||||||
|
@Deprecated("", level = DeprecationLevel.ERROR) get() = 3
|
||||||
|
@Deprecated("", level = DeprecationLevel.HIDDEN) set(value) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun use(
|
||||||
|
warningDeprecated: WarningDeprecated, errorDeprecated: ErrorDeprecated, setterDeprecated: SetterDeprecated,
|
||||||
|
getterDeprecated: GetterDeprecated, hiddenDeprecated: HiddenDeprecated,
|
||||||
|
wd: WD, ed: ED, gd: GD, sd: SD,
|
||||||
|
sdh: SDH, edh: EDH, ned: NED,
|
||||||
|
diff: Diff
|
||||||
|
) {
|
||||||
|
warningDeprecated.<!DEPRECATION!>p<!>
|
||||||
|
warningDeprecated.p <!DEPRECATION!>=<!> 1
|
||||||
|
|
||||||
|
errorDeprecated.<!DEPRECATION_ERROR!>p<!>
|
||||||
|
errorDeprecated.p <!DEPRECATION_ERROR!>=<!> 1
|
||||||
|
|
||||||
|
getterDeprecated.<!DEPRECATION!>p<!>
|
||||||
|
getterDeprecated.p = 1
|
||||||
|
|
||||||
|
setterDeprecated.p
|
||||||
|
setterDeprecated.p <!DEPRECATION!>=<!> 1
|
||||||
|
|
||||||
|
hiddenDeprecated.<!INVISIBLE_REFERENCE!>p<!>
|
||||||
|
hiddenDeprecated.<!INVISIBLE_REFERENCE!>p<!> = 1
|
||||||
|
|
||||||
|
wd.p
|
||||||
|
wd.p = 1
|
||||||
|
|
||||||
|
ed.p
|
||||||
|
ed.p = 1
|
||||||
|
|
||||||
|
gd.p
|
||||||
|
gd.p = 1
|
||||||
|
|
||||||
|
sd.p
|
||||||
|
sd.p = 1
|
||||||
|
|
||||||
|
sdh.p
|
||||||
|
sdh.p = 1
|
||||||
|
|
||||||
|
edh.p
|
||||||
|
edh.p = 1
|
||||||
|
|
||||||
|
ned.p
|
||||||
|
ned.p = 1
|
||||||
|
|
||||||
|
diff.<!DEPRECATION_ERROR!>p<!>
|
||||||
|
diff.<!INVISIBLE_REFERENCE!>p<!> = 1
|
||||||
|
}
|
||||||
+4
-3
@@ -1,3 +1,4 @@
|
|||||||
|
// LANGUAGE: -StopPropagatingDeprecationThroughOverrides
|
||||||
package foo
|
package foo
|
||||||
|
|
||||||
interface HiddenDeprecated {
|
interface HiddenDeprecated {
|
||||||
@@ -31,13 +32,13 @@ open class SetterDeprecated {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class WD: WarningDeprecated() {
|
class WD: WarningDeprecated() {
|
||||||
override var p: Int
|
override var <!OVERRIDE_DEPRECATION!>p<!>: Int
|
||||||
get() = 3
|
get() = 3
|
||||||
set(value) {}
|
set(value) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
class ED: ErrorDeprecated() {
|
class ED: ErrorDeprecated() {
|
||||||
override var p: Int
|
override var <!OVERRIDE_DEPRECATION!>p<!>: Int
|
||||||
get() = 3
|
get() = 3
|
||||||
set(value) {
|
set(value) {
|
||||||
}
|
}
|
||||||
@@ -65,7 +66,7 @@ class SDH: SetterDeprecated(), HiddenDeprecated {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class EDH: ErrorDeprecated(), HiddenDeprecated {
|
class EDH: ErrorDeprecated(), HiddenDeprecated {
|
||||||
override var p: Int
|
override var <!OVERRIDE_DEPRECATION!>p<!>: Int
|
||||||
get() = 3
|
get() = 3
|
||||||
set(value) {
|
set(value) {
|
||||||
}
|
}
|
||||||
+115
@@ -0,0 +1,115 @@
|
|||||||
|
package
|
||||||
|
|
||||||
|
package foo {
|
||||||
|
public fun use(/*0*/ warningDeprecated: foo.WarningDeprecated, /*1*/ errorDeprecated: foo.ErrorDeprecated, /*2*/ setterDeprecated: foo.SetterDeprecated, /*3*/ getterDeprecated: foo.GetterDeprecated, /*4*/ hiddenDeprecated: foo.HiddenDeprecated, /*5*/ wd: foo.WD, /*6*/ ed: foo.ED, /*7*/ gd: foo.GD, /*8*/ sd: foo.SD, /*9*/ sdh: foo.SDH, /*10*/ edh: foo.EDH, /*11*/ ned: foo.NED, /*12*/ diff: foo.Diff): kotlin.Unit
|
||||||
|
|
||||||
|
public final class Diff {
|
||||||
|
public constructor Diff()
|
||||||
|
@kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "") @get:kotlin.Deprecated(level = DeprecationLevel.ERROR, message = "") @set:kotlin.Deprecated(level = DeprecationLevel.HIDDEN, message = "") public final var p: 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
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class ED : foo.ErrorDeprecated {
|
||||||
|
public constructor ED()
|
||||||
|
public open override /*1*/ var p: 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
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class EDH : foo.ErrorDeprecated, foo.HiddenDeprecated {
|
||||||
|
public constructor EDH()
|
||||||
|
public open override /*2*/ var p: kotlin.Int
|
||||||
|
public open override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
|
public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
}
|
||||||
|
|
||||||
|
public open class ErrorDeprecated {
|
||||||
|
public constructor ErrorDeprecated()
|
||||||
|
@kotlin.Deprecated(level = DeprecationLevel.ERROR, message = "") public open var p: 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
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class GD : foo.GetterDeprecated {
|
||||||
|
public constructor GD()
|
||||||
|
public open override /*1*/ var p: 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
|
||||||
|
}
|
||||||
|
|
||||||
|
public open class GetterDeprecated {
|
||||||
|
public constructor GetterDeprecated()
|
||||||
|
@get:kotlin.Deprecated(message = "") public open var p: 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
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface HiddenDeprecated {
|
||||||
|
@kotlin.Deprecated(level = DeprecationLevel.HIDDEN, message = "") public abstract var p: 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
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class NED : foo.ErrorDeprecated, foo.NoDeprecation {
|
||||||
|
public constructor NED()
|
||||||
|
public open override /*2*/ var p: kotlin.Int
|
||||||
|
public open override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
|
public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface NoDeprecation {
|
||||||
|
public abstract var p: 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
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class SD : foo.SetterDeprecated {
|
||||||
|
public constructor SD()
|
||||||
|
public open override /*1*/ var p: 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
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class SDH : foo.SetterDeprecated, foo.HiddenDeprecated {
|
||||||
|
public constructor SDH()
|
||||||
|
public open override /*2*/ var p: kotlin.Int
|
||||||
|
public open override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
|
public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
}
|
||||||
|
|
||||||
|
public open class SetterDeprecated {
|
||||||
|
public constructor SetterDeprecated()
|
||||||
|
@set:kotlin.Deprecated(message = "") public open var p: 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
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class WD : foo.WarningDeprecated {
|
||||||
|
public constructor WD()
|
||||||
|
public open override /*1*/ var p: 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
|
||||||
|
}
|
||||||
|
|
||||||
|
public open class WarningDeprecated {
|
||||||
|
public constructor WarningDeprecated()
|
||||||
|
@kotlin.Deprecated(level = DeprecationLevel.WARNING, message = "") public open var p: 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
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -16,7 +16,7 @@ interface WithDeprecation {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class A : J(), WithDeprecation {
|
class A : J(), WithDeprecation {
|
||||||
override fun foo() {}
|
override fun <!OVERRIDE_DEPRECATION!>foo<!>() {}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun main() {
|
fun main() {
|
||||||
|
|||||||
@@ -58,13 +58,13 @@ interface I {
|
|||||||
}
|
}
|
||||||
|
|
||||||
<!ABSTRACT_MEMBER_NOT_IMPLEMENTED!>class X<!> : I {
|
<!ABSTRACT_MEMBER_NOT_IMPLEMENTED!>class X<!> : I {
|
||||||
override fun foo1() {
|
override fun <!OVERRIDE_DEPRECATION!>foo1<!>() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class B : A(<!TYPE_MISMATCH!>""<!>) {
|
class B : A(<!TYPE_MISMATCH!>""<!>) {
|
||||||
// still can override it
|
// still can override it
|
||||||
override fun memberFun() {
|
override fun <!OVERRIDE_DEPRECATION!>memberFun<!>() {
|
||||||
super.<!UNRESOLVED_REFERENCE!>memberFun<!>() // but cannot call super :)
|
super.<!UNRESOLVED_REFERENCE!>memberFun<!>() // but cannot call super :)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
interface A : MutableCollection<String> {
|
interface A : MutableCollection<String> {
|
||||||
// Override of deprecated function could be marked as deprecated too
|
// Override of deprecated function could be marked as deprecated too
|
||||||
override fun nonExistingMethod(x: String) = ""
|
override fun <!OVERRIDE_DEPRECATION!>nonExistingMethod<!>(x: String) = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
fun foo(x: MutableCollection<Int>, y: Collection<String>, z: A) {
|
fun foo(x: MutableCollection<Int>, y: Collection<String>, z: A) {
|
||||||
|
|||||||
Generated
+18
-6
@@ -8604,15 +8604,27 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("deprecatedInheritance.kt")
|
@TestMetadata("deprecatedInheritance_after.kt")
|
||||||
public void testDeprecatedInheritance() throws Exception {
|
public void testDeprecatedInheritance_after() throws Exception {
|
||||||
runTest("compiler/testData/diagnostics/tests/deprecated/deprecatedInheritance.kt");
|
runTest("compiler/testData/diagnostics/tests/deprecated/deprecatedInheritance_after.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("deprecatedPropertyInheritance.kt")
|
@TestMetadata("deprecatedInheritance_before.kt")
|
||||||
public void testDeprecatedPropertyInheritance() throws Exception {
|
public void testDeprecatedInheritance_before() throws Exception {
|
||||||
runTest("compiler/testData/diagnostics/tests/deprecated/deprecatedPropertyInheritance.kt");
|
runTest("compiler/testData/diagnostics/tests/deprecated/deprecatedInheritance_before.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("deprecatedPropertyInheritance_after.kt")
|
||||||
|
public void testDeprecatedPropertyInheritance_after() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/deprecated/deprecatedPropertyInheritance_after.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("deprecatedPropertyInheritance_before.kt")
|
||||||
|
public void testDeprecatedPropertyInheritance_before() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/deprecated/deprecatedPropertyInheritance_before.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
@@ -230,6 +230,7 @@ enum class LanguageFeature(
|
|||||||
ProhibitSimplificationOfNonTrivialConstBooleanExpressions(KOTLIN_1_7),
|
ProhibitSimplificationOfNonTrivialConstBooleanExpressions(KOTLIN_1_7),
|
||||||
SafeCallsAreAlwaysNullable(KOTLIN_1_7),
|
SafeCallsAreAlwaysNullable(KOTLIN_1_7),
|
||||||
ApproximateIntegerLiteralTypesInReceiverPosition(KOTLIN_1_7),
|
ApproximateIntegerLiteralTypesInReceiverPosition(KOTLIN_1_7),
|
||||||
|
StopPropagatingDeprecationThroughOverrides(KOTLIN_1_7),
|
||||||
|
|
||||||
// Temporarily disabled, see KT-27084/KT-22379
|
// Temporarily disabled, see KT-27084/KT-22379
|
||||||
SoundSmartcastFromLoopConditionForLoopAssignedVariables(sinceVersion = null, kind = BUG_FIX),
|
SoundSmartcastFromLoopConditionForLoopAssignedVariables(sinceVersion = null, kind = BUG_FIX),
|
||||||
|
|||||||
+18
-6
@@ -8598,15 +8598,27 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("deprecatedInheritance.kt")
|
@TestMetadata("deprecatedInheritance_after.kt")
|
||||||
public void testDeprecatedInheritance() throws Exception {
|
public void testDeprecatedInheritance_after() throws Exception {
|
||||||
runTest("compiler/testData/diagnostics/tests/deprecated/deprecatedInheritance.kt");
|
runTest("compiler/testData/diagnostics/tests/deprecated/deprecatedInheritance_after.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("deprecatedPropertyInheritance.kt")
|
@TestMetadata("deprecatedInheritance_before.kt")
|
||||||
public void testDeprecatedPropertyInheritance() throws Exception {
|
public void testDeprecatedInheritance_before() throws Exception {
|
||||||
runTest("compiler/testData/diagnostics/tests/deprecated/deprecatedPropertyInheritance.kt");
|
runTest("compiler/testData/diagnostics/tests/deprecated/deprecatedInheritance_before.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("deprecatedPropertyInheritance_after.kt")
|
||||||
|
public void testDeprecatedPropertyInheritance_after() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/deprecated/deprecatedPropertyInheritance_after.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("deprecatedPropertyInheritance_before.kt")
|
||||||
|
public void testDeprecatedPropertyInheritance_before() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/deprecated/deprecatedPropertyInheritance_before.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
Reference in New Issue
Block a user