Add tests for obsolete issues
#KT-32207 Obsolete #KT-32836 Obsolete #KT-32949 Obsolete #KT-9384 Obsolete
This commit is contained in:
+15
@@ -10363,6 +10363,11 @@ public class FirDiagnosticsSmokeTestGenerated extends AbstractFirDiagnosticsSmok
|
||||
runTest("compiler/testData/diagnostics/tests/inference/nothingType/kt32081.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt32207.kt")
|
||||
public void testKt32207() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/inference/nothingType/kt32207.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt32388.kt")
|
||||
public void testKt32388() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/inference/nothingType/kt32388.kt");
|
||||
@@ -17105,6 +17110,11 @@ public class FirDiagnosticsSmokeTestGenerated extends AbstractFirDiagnosticsSmok
|
||||
runTest("compiler/testData/diagnostics/tests/regressions/kt328.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt32836.kt")
|
||||
public void testKt32836() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/regressions/kt32836.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt334.kt")
|
||||
public void testKt334() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/regressions/kt334.kt");
|
||||
@@ -17375,6 +17385,11 @@ public class FirDiagnosticsSmokeTestGenerated extends AbstractFirDiagnosticsSmok
|
||||
runTest("compiler/testData/diagnostics/tests/regressions/kt860.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt9384.kt")
|
||||
public void testKt9384() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/regressions/kt9384.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt9620.kt")
|
||||
public void testKt9620() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/regressions/kt9620.kt");
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
class Binder() {
|
||||
lateinit var bindee: Container<*>
|
||||
|
||||
fun bind(subject: Container<*>): String {
|
||||
bindee = subject
|
||||
return when(subject.containee) {
|
||||
is Foo -> bind(subject.containee)
|
||||
is Bar -> bind(subject.containee)
|
||||
else -> TODO()
|
||||
}
|
||||
}
|
||||
|
||||
private fun bind(foo: Foo): String {
|
||||
return "binding $foo"
|
||||
}
|
||||
private fun bind(bar: Bar): String {
|
||||
return "binding $bar"
|
||||
}
|
||||
}
|
||||
class Container<out T>(val containee: T)
|
||||
data class Foo(val x: Int = 0)
|
||||
data class Bar(val y: Int = 0)
|
||||
|
||||
fun box(): String {
|
||||
val f = Container(Foo(1))
|
||||
val b = Container(Bar(2))
|
||||
|
||||
val binder = Binder()
|
||||
|
||||
if (binder.bind(f) != "binding Foo(x=1)") return "fail 1"
|
||||
if (binder.bind(b) != "binding Bar(y=2)") return "fail 2"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
class Test<X, T> {
|
||||
fun hereIdeaFail(values : List<Int>, others : List<String>): List<Test<out Int, out String>> {
|
||||
return values.map { left(it) }.plus(others.map { right(it) })
|
||||
}
|
||||
|
||||
companion object {
|
||||
fun <L> left(left: L): Test<L, Nothing> = TODO()
|
||||
fun <R> right(right: R): Test<Nothing, R> = TODO()
|
||||
}
|
||||
}
|
||||
|
||||
fun <T, R> Iterable<T>.map(transform: (T) -> R): List<R> = TODO()
|
||||
operator fun <T> Collection<T>.plus(elements: Iterable<T>): List<T> = TODO()
|
||||
@@ -0,0 +1,21 @@
|
||||
package
|
||||
|
||||
public fun </*0*/ T, /*1*/ R> kotlin.collections.Iterable<T>.map(/*0*/ transform: (T) -> R): kotlin.collections.List<R>
|
||||
public operator fun </*0*/ T> kotlin.collections.Collection<T>.plus(/*0*/ elements: kotlin.collections.Iterable<T>): kotlin.collections.List<T>
|
||||
|
||||
public final class Test</*0*/ X, /*1*/ T> {
|
||||
public constructor Test</*0*/ X, /*1*/ 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 final fun hereIdeaFail(/*0*/ values: kotlin.collections.List<kotlin.Int>, /*1*/ others: kotlin.collections.List<kotlin.String>): kotlin.collections.List<Test<out kotlin.Int, out kotlin.String>>
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
public companion object Companion {
|
||||
private constructor Companion()
|
||||
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 </*0*/ L> left(/*0*/ left: L): Test<L, kotlin.Nothing>
|
||||
public final fun </*0*/ R> right(/*0*/ right: R): Test<kotlin.Nothing, R>
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
inline fun <reified T> parse(json: String): T? = TODO()
|
||||
|
||||
class MyType
|
||||
|
||||
fun parseMyData(json: String): MyType =
|
||||
try {
|
||||
parse(json) // error with new inf only: Cannot use 'Nothing?' as reified type parameter
|
||||
?: throw IllegalArgumentException("Can't parse")
|
||||
} catch (e: Exception) {
|
||||
throw IllegalArgumentException("Can't parse")
|
||||
}
|
||||
|
||||
fun main() {
|
||||
parseMyData("")
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package
|
||||
|
||||
public fun main(): kotlin.Unit
|
||||
public inline fun </*0*/ reified T> parse(/*0*/ json: kotlin.String): T?
|
||||
public fun parseMyData(/*0*/ json: kotlin.String): MyType
|
||||
|
||||
public final class MyType {
|
||||
public constructor MyType()
|
||||
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,11 @@
|
||||
fun main(args: Array<String>) {
|
||||
fun f() = run {
|
||||
<!WRONG_MODIFIER_TARGET!>private<!> class C {
|
||||
private fun foo() {
|
||||
<!TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM!><!DEBUG_INFO_MISSING_UNRESOLVED!>f<!>()<!>.<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>foo<!>();
|
||||
|
||||
}
|
||||
}
|
||||
C()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
package
|
||||
|
||||
public fun main(/*0*/ args: kotlin.Array<kotlin.String>): kotlin.Unit
|
||||
@@ -10370,6 +10370,11 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
|
||||
runTest("compiler/testData/diagnostics/tests/inference/nothingType/kt32081.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt32207.kt")
|
||||
public void testKt32207() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/inference/nothingType/kt32207.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt32388.kt")
|
||||
public void testKt32388() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/inference/nothingType/kt32388.kt");
|
||||
@@ -17117,6 +17122,11 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
|
||||
runTest("compiler/testData/diagnostics/tests/regressions/kt328.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt32836.kt")
|
||||
public void testKt32836() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/regressions/kt32836.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt334.kt")
|
||||
public void testKt334() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/regressions/kt334.kt");
|
||||
@@ -17387,6 +17397,11 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
|
||||
runTest("compiler/testData/diagnostics/tests/regressions/kt860.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt9384.kt")
|
||||
public void testKt9384() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/regressions/kt9384.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt9620.kt")
|
||||
public void testKt9620() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/regressions/kt9620.kt");
|
||||
|
||||
Generated
+15
@@ -10365,6 +10365,11 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing
|
||||
runTest("compiler/testData/diagnostics/tests/inference/nothingType/kt32081.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt32207.kt")
|
||||
public void testKt32207() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/inference/nothingType/kt32207.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt32388.kt")
|
||||
public void testKt32388() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/inference/nothingType/kt32388.kt");
|
||||
@@ -17107,6 +17112,11 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing
|
||||
runTest("compiler/testData/diagnostics/tests/regressions/kt328.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt32836.kt")
|
||||
public void testKt32836() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/regressions/kt32836.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt334.kt")
|
||||
public void testKt334() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/regressions/kt334.kt");
|
||||
@@ -17377,6 +17387,11 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing
|
||||
runTest("compiler/testData/diagnostics/tests/regressions/kt860.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt9384.kt")
|
||||
public void testKt9384() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/regressions/kt9384.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt9620.kt")
|
||||
public void testKt9620() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/regressions/kt9620.kt");
|
||||
|
||||
+5
@@ -22819,6 +22819,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
runTest("compiler/testData/codegen/box/regressions/kt3107.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt32949.kt")
|
||||
public void testKt32949() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/regressions/kt32949.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt3421.kt")
|
||||
public void testKt3421() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/regressions/kt3421.kt");
|
||||
|
||||
+5
@@ -22819,6 +22819,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
runTest("compiler/testData/codegen/box/regressions/kt3107.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt32949.kt")
|
||||
public void testKt32949() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/regressions/kt32949.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt3421.kt")
|
||||
public void testKt3421() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/regressions/kt3421.kt");
|
||||
|
||||
+5
@@ -21719,6 +21719,11 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
runTest("compiler/testData/codegen/box/regressions/kt3107.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt32949.kt")
|
||||
public void testKt32949() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/regressions/kt32949.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt3421.kt")
|
||||
public void testKt3421() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/regressions/kt3421.kt");
|
||||
|
||||
Generated
+5
@@ -17484,6 +17484,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/regressions/kt3107.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt32949.kt")
|
||||
public void testKt32949() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/regressions/kt32949.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt3421.kt")
|
||||
public void testKt3421() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/regressions/kt3421.kt");
|
||||
|
||||
+5
@@ -18639,6 +18639,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/regressions/kt3107.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt32949.kt")
|
||||
public void testKt32949() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/regressions/kt32949.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt3421.kt")
|
||||
public void testKt3421() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/regressions/kt3421.kt");
|
||||
|
||||
Reference in New Issue
Block a user