FIR: Add test for candidate behind hidden property accessors.
See KT-48799.
This commit is contained in:
committed by
TeamCityServer
parent
f35680f0a4
commit
63cc18b095
+6
@@ -8591,6 +8591,12 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag
|
||||
runTest("compiler/testData/diagnostics/tests/deprecated/annotationUsage.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("candidateBehindHiddenPropertyAccessors.kt")
|
||||
public void testCandidateBehindHiddenPropertyAccessors() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/deprecated/candidateBehindHiddenPropertyAccessors.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("classWithCompanionObject.kt")
|
||||
public void testClassWithCompanionObject() throws Exception {
|
||||
|
||||
+6
@@ -8591,6 +8591,12 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti
|
||||
runTest("compiler/testData/diagnostics/tests/deprecated/annotationUsage.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("candidateBehindHiddenPropertyAccessors.kt")
|
||||
public void testCandidateBehindHiddenPropertyAccessors() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/deprecated/candidateBehindHiddenPropertyAccessors.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("classWithCompanionObject.kt")
|
||||
public void testClassWithCompanionObject() throws Exception {
|
||||
|
||||
+6
@@ -8591,6 +8591,12 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac
|
||||
runTest("compiler/testData/diagnostics/tests/deprecated/annotationUsage.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("candidateBehindHiddenPropertyAccessors.kt")
|
||||
public void testCandidateBehindHiddenPropertyAccessors() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/deprecated/candidateBehindHiddenPropertyAccessors.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("classWithCompanionObject.kt")
|
||||
public void testClassWithCompanionObject() throws Exception {
|
||||
|
||||
Vendored
+53
@@ -0,0 +1,53 @@
|
||||
class C {
|
||||
val v1: String
|
||||
@Deprecated("", level = DeprecationLevel.HIDDEN)
|
||||
get() = ""
|
||||
|
||||
@Deprecated("", level = DeprecationLevel.HIDDEN)
|
||||
val v2 = ""
|
||||
|
||||
var v3: String
|
||||
@Deprecated("", level = DeprecationLevel.HIDDEN)
|
||||
get() = ""
|
||||
set(value) {}
|
||||
|
||||
var v4: String
|
||||
get() = ""
|
||||
@Deprecated("", level = DeprecationLevel.HIDDEN)
|
||||
set(value) {
|
||||
}
|
||||
|
||||
var v5: String
|
||||
@Deprecated("", level = DeprecationLevel.HIDDEN)
|
||||
get() = ""
|
||||
@Deprecated("", level = DeprecationLevel.HIDDEN)
|
||||
set(value) {
|
||||
}
|
||||
|
||||
@Deprecated("", level = DeprecationLevel.HIDDEN)
|
||||
var v6: String
|
||||
get() = ""
|
||||
set(value) {}
|
||||
}
|
||||
|
||||
val v1: String = ""
|
||||
val v2: String = ""
|
||||
var v3: String = ""
|
||||
var v4: String = ""
|
||||
var v5: String = ""
|
||||
var v6: String = ""
|
||||
|
||||
fun test(c: C) {
|
||||
with (c) {
|
||||
v1 // DEPRECATION_ERROR in FE 1.0, see KT-48799
|
||||
v2
|
||||
v3 // DEPRECATION_ERROR in FE 1.0, see KT-48799
|
||||
v3 = ""
|
||||
v4
|
||||
v4 = "" // DEPRECATION_ERROR in FE 1.0, see KT-48799
|
||||
v5 // DEPRECATION_ERROR in FE 1.0, see KT-48799
|
||||
v5 = "" // DEPRECATION_ERROR in FE 1.0, see KT-48799
|
||||
v6
|
||||
v6 = ""
|
||||
}
|
||||
}
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
class C {
|
||||
val v1: String
|
||||
@Deprecated("", level = DeprecationLevel.HIDDEN)
|
||||
get() = ""
|
||||
|
||||
@Deprecated("", level = DeprecationLevel.HIDDEN)
|
||||
val v2 = ""
|
||||
|
||||
var v3: String
|
||||
@Deprecated("", level = DeprecationLevel.HIDDEN)
|
||||
get() = ""
|
||||
set(value) {}
|
||||
|
||||
var v4: String
|
||||
get() = ""
|
||||
@Deprecated("", level = DeprecationLevel.HIDDEN)
|
||||
set(value) {
|
||||
}
|
||||
|
||||
var v5: String
|
||||
@Deprecated("", level = DeprecationLevel.HIDDEN)
|
||||
get() = ""
|
||||
@Deprecated("", level = DeprecationLevel.HIDDEN)
|
||||
set(value) {
|
||||
}
|
||||
|
||||
@Deprecated("", level = DeprecationLevel.HIDDEN)
|
||||
var v6: String
|
||||
get() = ""
|
||||
set(value) {}
|
||||
}
|
||||
|
||||
val v1: String = ""
|
||||
val v2: String = ""
|
||||
var v3: String = ""
|
||||
var v4: String = ""
|
||||
var v5: String = ""
|
||||
var v6: String = ""
|
||||
|
||||
fun test(c: C) {
|
||||
with (c) {
|
||||
<!DEPRECATION_ERROR!>v1<!> // DEPRECATION_ERROR in FE 1.0, see KT-48799
|
||||
v2
|
||||
<!DEPRECATION_ERROR!>v3<!> // DEPRECATION_ERROR in FE 1.0, see KT-48799
|
||||
v3 = ""
|
||||
v4
|
||||
<!DEPRECATION_ERROR!>v4<!> = "" // DEPRECATION_ERROR in FE 1.0, see KT-48799
|
||||
<!DEPRECATION_ERROR!>v5<!> // DEPRECATION_ERROR in FE 1.0, see KT-48799
|
||||
<!DEPRECATION_ERROR!>v5<!> = "" // DEPRECATION_ERROR in FE 1.0, see KT-48799
|
||||
v6
|
||||
v6 = ""
|
||||
}
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
package
|
||||
|
||||
public val v1: kotlin.String = ""
|
||||
public val v2: kotlin.String = ""
|
||||
public var v3: kotlin.String
|
||||
public var v4: kotlin.String
|
||||
public var v5: kotlin.String
|
||||
public var v6: kotlin.String
|
||||
public fun test(/*0*/ c: C): kotlin.Unit
|
||||
|
||||
public final class C {
|
||||
public constructor C()
|
||||
@get:kotlin.Deprecated(level = DeprecationLevel.HIDDEN, message = "") public final val v1: kotlin.String
|
||||
@kotlin.Deprecated(level = DeprecationLevel.HIDDEN, message = "") public final val v2: kotlin.String = ""
|
||||
@get:kotlin.Deprecated(level = DeprecationLevel.HIDDEN, message = "") public final var v3: kotlin.String
|
||||
@set:kotlin.Deprecated(level = DeprecationLevel.HIDDEN, message = "") public final var v4: kotlin.String
|
||||
@get:kotlin.Deprecated(level = DeprecationLevel.HIDDEN, message = "") @set:kotlin.Deprecated(level = DeprecationLevel.HIDDEN, message = "") public final var v5: kotlin.String
|
||||
@kotlin.Deprecated(level = DeprecationLevel.HIDDEN, message = "") public final var v6: kotlin.String
|
||||
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
|
||||
}
|
||||
Generated
+6
@@ -8597,6 +8597,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
||||
runTest("compiler/testData/diagnostics/tests/deprecated/annotationUsage.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("candidateBehindHiddenPropertyAccessors.kt")
|
||||
public void testCandidateBehindHiddenPropertyAccessors() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/deprecated/candidateBehindHiddenPropertyAccessors.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("classWithCompanionObject.kt")
|
||||
public void testClassWithCompanionObject() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user