Add tests for obsolete issues
#KT-28001 Obsolete #KT-30236 Obsolete
This commit is contained in:
+10
@@ -2501,6 +2501,11 @@ public class FirDiagnosticsSmokeTestGenerated extends AbstractFirDiagnosticsSmok
|
||||
runTest("compiler/testData/diagnostics/tests/callableReference/resolve/multipleOutersAndMultipleCallableReferences.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("noAmbiguityBetweenTopLevelAndMemberProperty.kt")
|
||||
public void testNoAmbiguityBetweenTopLevelAndMemberProperty() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/callableReference/resolve/noAmbiguityBetweenTopLevelAndMemberProperty.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("noFakeDescriptorForObject.kt")
|
||||
public void testNoFakeDescriptorForObject() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/callableReference/resolve/noFakeDescriptorForObject.kt");
|
||||
@@ -17060,6 +17065,11 @@ public class FirDiagnosticsSmokeTestGenerated extends AbstractFirDiagnosticsSmok
|
||||
runTest("compiler/testData/diagnostics/tests/regressions/kt2768.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt28001.kt")
|
||||
public void testKt28001() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/regressions/kt28001.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt282.kt")
|
||||
public void testKt282() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/regressions/kt282.kt");
|
||||
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
import kotlin.reflect.KProperty0
|
||||
import kotlin.reflect.KProperty1
|
||||
|
||||
fun <R> property(property: KProperty0<R>): Int = 1
|
||||
fun <T, R> property(property: KProperty1<T, R>): String = ""
|
||||
|
||||
val subject = ""
|
||||
|
||||
class O {
|
||||
val subject = ""
|
||||
}
|
||||
|
||||
val someProperty0 = property(::subject)
|
||||
val someProperty1 = property(O::subject)
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
package
|
||||
|
||||
public val someProperty0: kotlin.Int
|
||||
public val someProperty1: kotlin.String
|
||||
public val subject: kotlin.String = ""
|
||||
public fun </*0*/ R> property(/*0*/ property: kotlin.reflect.KProperty0<R>): kotlin.Int
|
||||
public fun </*0*/ T, /*1*/ R> property(/*0*/ property: kotlin.reflect.KProperty1<T, R>): kotlin.String
|
||||
|
||||
public final class O {
|
||||
public constructor O()
|
||||
public final val subject: 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
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
// !DIAGNOSTICS: -UNUSED_VARIABLE -UNUSED_PARAMETER
|
||||
|
||||
private object Case1 {
|
||||
interface Validator<in T>
|
||||
|
||||
class CharSequenceValidator: Validator<CharSequence>
|
||||
|
||||
class PredicateValidator<T>(val predicate: (T) -> Boolean): Validator<T>
|
||||
|
||||
class CompositeValidator<T>(vararg val validators: Validator<T>)
|
||||
|
||||
fun process(input: String) = true
|
||||
|
||||
fun main() {
|
||||
val validators1 = CompositeValidator(CharSequenceValidator(), PredicateValidator(::process))
|
||||
val validators2 = CompositeValidator<String>(CharSequenceValidator(), PredicateValidator(::process))
|
||||
val validators3 = CompositeValidator(CharSequenceValidator(), PredicateValidator { it: String -> process(it) })
|
||||
}
|
||||
}
|
||||
|
||||
private object Case2 {
|
||||
interface Expr<out T>
|
||||
data class Add(val left: Expr<Int>, val right: Expr<Int>): Expr<Int>
|
||||
data class Subtract(val left: Expr<Int>, val right: Expr<Int>): Expr<Int>
|
||||
|
||||
fun f() {
|
||||
val operators1 = listOf(::Add, ::Subtract)
|
||||
val operators2 = listOf<(Expr<Int>, Expr<Int>) -> Expr<Int>>(::Add, ::Subtract)
|
||||
}
|
||||
|
||||
fun <T> listOf(vararg elements: T): List<T> = TODO()
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
package
|
||||
|
||||
private object Case1 {
|
||||
private constructor Case1()
|
||||
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 final fun main(): kotlin.Unit
|
||||
public final fun process(/*0*/ input: kotlin.String): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
public final class CharSequenceValidator : Case1.Validator<kotlin.CharSequence> {
|
||||
public constructor CharSequenceValidator()
|
||||
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 CompositeValidator</*0*/ T> {
|
||||
public constructor CompositeValidator</*0*/ T>(/*0*/ vararg validators: Case1.Validator<T> /*kotlin.Array<out Case1.Validator<T>>*/)
|
||||
public final val validators: kotlin.Array<out Case1.Validator<T>>
|
||||
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 PredicateValidator</*0*/ T> : Case1.Validator<T> {
|
||||
public constructor PredicateValidator</*0*/ T>(/*0*/ predicate: (T) -> kotlin.Boolean)
|
||||
public final val predicate: (T) -> kotlin.Boolean
|
||||
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 Validator</*0*/ in T> {
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
private object Case2 {
|
||||
private constructor Case2()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final fun f(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final fun </*0*/ T> listOf(/*0*/ vararg elements: T /*kotlin.Array<out T>*/): kotlin.collections.List<T>
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
public final data class Add : Case2.Expr<kotlin.Int> {
|
||||
public constructor Add(/*0*/ left: Case2.Expr<kotlin.Int>, /*1*/ right: Case2.Expr<kotlin.Int>)
|
||||
public final val left: Case2.Expr<kotlin.Int>
|
||||
public final val right: Case2.Expr<kotlin.Int>
|
||||
public final operator /*synthesized*/ fun component1(): Case2.Expr<kotlin.Int>
|
||||
public final operator /*synthesized*/ fun component2(): Case2.Expr<kotlin.Int>
|
||||
public final /*synthesized*/ fun copy(/*0*/ left: Case2.Expr<kotlin.Int> = ..., /*1*/ right: Case2.Expr<kotlin.Int> = ...): Case2.Add
|
||||
public open override /*1*/ /*synthesized*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*synthesized*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*synthesized*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public interface Expr</*0*/ out T> {
|
||||
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 data class Subtract : Case2.Expr<kotlin.Int> {
|
||||
public constructor Subtract(/*0*/ left: Case2.Expr<kotlin.Int>, /*1*/ right: Case2.Expr<kotlin.Int>)
|
||||
public final val left: Case2.Expr<kotlin.Int>
|
||||
public final val right: Case2.Expr<kotlin.Int>
|
||||
public final operator /*synthesized*/ fun component1(): Case2.Expr<kotlin.Int>
|
||||
public final operator /*synthesized*/ fun component2(): Case2.Expr<kotlin.Int>
|
||||
public final /*synthesized*/ fun copy(/*0*/ left: Case2.Expr<kotlin.Int> = ..., /*1*/ right: Case2.Expr<kotlin.Int> = ...): Case2.Subtract
|
||||
public open override /*1*/ /*synthesized*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*synthesized*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*synthesized*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
@@ -2508,6 +2508,11 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
|
||||
runTest("compiler/testData/diagnostics/tests/callableReference/resolve/multipleOutersAndMultipleCallableReferences.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("noAmbiguityBetweenTopLevelAndMemberProperty.kt")
|
||||
public void testNoAmbiguityBetweenTopLevelAndMemberProperty() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/callableReference/resolve/noAmbiguityBetweenTopLevelAndMemberProperty.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("noFakeDescriptorForObject.kt")
|
||||
public void testNoFakeDescriptorForObject() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/callableReference/resolve/noFakeDescriptorForObject.kt");
|
||||
@@ -17072,6 +17077,11 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
|
||||
runTest("compiler/testData/diagnostics/tests/regressions/kt2768.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt28001.kt")
|
||||
public void testKt28001() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/regressions/kt28001.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt282.kt")
|
||||
public void testKt282() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/regressions/kt282.kt");
|
||||
|
||||
Generated
+10
@@ -2503,6 +2503,11 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing
|
||||
runTest("compiler/testData/diagnostics/tests/callableReference/resolve/multipleOutersAndMultipleCallableReferences.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("noAmbiguityBetweenTopLevelAndMemberProperty.kt")
|
||||
public void testNoAmbiguityBetweenTopLevelAndMemberProperty() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/callableReference/resolve/noAmbiguityBetweenTopLevelAndMemberProperty.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("noFakeDescriptorForObject.kt")
|
||||
public void testNoFakeDescriptorForObject() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/callableReference/resolve/noFakeDescriptorForObject.kt");
|
||||
@@ -17062,6 +17067,11 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing
|
||||
runTest("compiler/testData/diagnostics/tests/regressions/kt2768.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt28001.kt")
|
||||
public void testKt28001() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/regressions/kt28001.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt282.kt")
|
||||
public void testKt282() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/regressions/kt282.kt");
|
||||
|
||||
Reference in New Issue
Block a user