Add tests for obsolete issues

#KT-32183 Obsolete
 #KT-31474 Obsolete
 #KT-31853 Obsolete
This commit is contained in:
Mikhail Zarechenskiy
2020-07-14 11:21:17 +03:00
parent 19dc3f071c
commit 8158ba2be3
5 changed files with 167 additions and 0 deletions
@@ -9380,6 +9380,11 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirOldFronte
runTest("compiler/testData/diagnostics/tests/generics/starProjections/collectionInheritedFromJava.kt");
}
@TestMetadata("foldRecursiveTypesToStarProjection.kt")
public void testFoldRecursiveTypesToStarProjection() throws Exception {
runTest("compiler/testData/diagnostics/tests/generics/starProjections/foldRecursiveTypesToStarProjection.kt");
}
@TestMetadata("inheritedFromJava.kt")
public void testInheritedFromJava() throws Exception {
runTest("compiler/testData/diagnostics/tests/generics/starProjections/inheritedFromJava.kt");
@@ -0,0 +1,46 @@
// FIR_IDENTICAL
// !DIAGNOSTICS: -UNUSED_EXPRESSION
// WITH_RUNTIME
object KT32183 {
interface AGraphExecutionEntity {
val jobs: Sequence<AJobExecutionEntity>
}
interface AJobExecutionEntity {
val meta: ProjectJob.Process<*, *>
}
sealed class ProjectJob {
sealed class Process<E : ProcessExecutable<E>, R : ProcessResources<R>> : ProjectJob()
sealed class ProcessExecutable<E : ProcessExecutable<E>>
sealed class ProcessResources<R : ProcessResources<R>>
}
fun test(graph: AGraphExecutionEntity) {
val statusByMeta = graph.jobs.associateBy { it.meta }
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Map<KT32183.ProjectJob.Process<*, *>, KT32183.AJobExecutionEntity>")!>statusByMeta<!>
}
}
object KT31474 {
abstract class A<T : A<T>>
class B : A<B>()
class C : A<C>()
fun test() {
val a = listOf(B(), C())
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.List<KT31474.A<*>>")!>a<!>
}
}
object KT31853 {
interface A<out T>
interface B : A<B>
interface C : A<C>
fun test(b: B, c: C) {
val a = if (true) b else c
<!DEBUG_INFO_EXPRESSION_TYPE("KT31853.A<*>")!>a<!>
}
}
@@ -0,0 +1,106 @@
package
public object KT31474 {
private constructor KT31474()
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 test(): kotlin.Unit
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
public abstract class A</*0*/ T : KT31474.A<T>> {
public constructor A</*0*/ T : KT31474.A<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 B : KT31474.A<KT31474.B> {
public constructor B()
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 C : KT31474.A<KT31474.C> {
public constructor C()
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 object KT31853 {
private constructor KT31853()
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 test(/*0*/ b: KT31853.B, /*1*/ c: KT31853.C): kotlin.Unit
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
public interface A</*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 interface B : KT31853.A<KT31853.B> {
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 C : KT31853.A<KT31853.C> {
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 object KT32183 {
private constructor KT32183()
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 test(/*0*/ graph: KT32183.AGraphExecutionEntity): kotlin.Unit
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
public interface AGraphExecutionEntity {
public abstract val jobs: kotlin.sequences.Sequence<KT32183.AJobExecutionEntity>
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 AJobExecutionEntity {
public abstract val meta: KT32183.ProjectJob.Process<*, *>
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 sealed class ProjectJob {
private constructor ProjectJob()
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 sealed class Process</*0*/ E : KT32183.ProjectJob.ProcessExecutable<E>, /*1*/ R : KT32183.ProjectJob.ProcessResources<R>> : KT32183.ProjectJob {
private constructor Process</*0*/ E : KT32183.ProjectJob.ProcessExecutable<E>, /*1*/ R : KT32183.ProjectJob.ProcessResources<R>>()
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 sealed class ProcessExecutable</*0*/ E : KT32183.ProjectJob.ProcessExecutable<E>> {
private constructor ProcessExecutable</*0*/ E : KT32183.ProjectJob.ProcessExecutable<E>>()
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 sealed class ProcessResources</*0*/ R : KT32183.ProjectJob.ProcessResources<R>> {
private constructor ProcessResources</*0*/ R : KT32183.ProjectJob.ProcessResources<R>>()
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
}
}
}
@@ -9387,6 +9387,11 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTestWithFirVali
runTest("compiler/testData/diagnostics/tests/generics/starProjections/collectionInheritedFromJava.kt");
}
@TestMetadata("foldRecursiveTypesToStarProjection.kt")
public void testFoldRecursiveTypesToStarProjection() throws Exception {
runTest("compiler/testData/diagnostics/tests/generics/starProjections/foldRecursiveTypesToStarProjection.kt");
}
@TestMetadata("inheritedFromJava.kt")
public void testInheritedFromJava() throws Exception {
runTest("compiler/testData/diagnostics/tests/generics/starProjections/inheritedFromJava.kt");
@@ -9382,6 +9382,11 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing
runTest("compiler/testData/diagnostics/tests/generics/starProjections/collectionInheritedFromJava.kt");
}
@TestMetadata("foldRecursiveTypesToStarProjection.kt")
public void testFoldRecursiveTypesToStarProjection() throws Exception {
runTest("compiler/testData/diagnostics/tests/generics/starProjections/foldRecursiveTypesToStarProjection.kt");
}
@TestMetadata("inheritedFromJava.kt")
public void testInheritedFromJava() throws Exception {
runTest("compiler/testData/diagnostics/tests/generics/starProjections/inheritedFromJava.kt");