[NI] Add test for obsolete issue

#KT-28658 Obsolete
This commit is contained in:
Mikhail Zarechenskiy
2019-04-12 15:20:40 +03:00
parent d5cd49b2bf
commit bdab7a88f6
7 changed files with 73 additions and 0 deletions
@@ -9770,6 +9770,11 @@ public class FirDiagnosticsSmokeTestGenerated extends AbstractFirDiagnosticsSmok
runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/capturedType.kt");
}
@TestMetadata("capturedTypeAgainstNullableInvariantType.kt")
public void testCapturedTypeAgainstNullableInvariantType() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/capturedTypeAgainstNullableInvariantType.kt");
}
@TestMetadata("capturedTypeAndApproximation.kt")
public void testCapturedTypeAndApproximation() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/capturedTypeAndApproximation.kt");
@@ -0,0 +1,34 @@
// !LANGUAGE: +NewInference
// !USE_EXPERIMENTAL: kotlin.Experimental
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE
import kotlin.experimental.ExperimentalTypeInference
fun test1() {
sequence {
val a: Array<Int> = arrayOf(1, 2, 3)
val b = arrayOf(1, 2, 3)
}
}
fun test2() = sequence { arrayOf(1, 2, 3) }
class Foo<T>
fun <T> f1(f: Foo<T>.() -> Unit) {}
@UseExperimental(ExperimentalTypeInference::class)
fun <T> f2(@BuilderInference f: Foo<T>.() -> Unit) {
}
fun test3() {
f1 {
val a: Array<Int> = arrayOf(1, 2, 3)
}
f2 {
val a: Array<Int> = arrayOf(1, 2, 3)
}
}
@@ -0,0 +1,14 @@
package
public fun </*0*/ T> f1(/*0*/ f: Foo<T>.() -> kotlin.Unit): kotlin.Unit
@kotlin.UseExperimental(markerClass = {kotlin.experimental.ExperimentalTypeInference::class}) public fun </*0*/ T> f2(/*0*/ @kotlin.BuilderInference f: Foo<T>.() -> kotlin.Unit): kotlin.Unit
public fun test1(): kotlin.Unit
public fun test2(): kotlin.sequences.Sequence<kotlin.Any?>
public fun test3(): kotlin.Unit
public final class Foo</*0*/ T> {
public constructor Foo</*0*/ 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
}
@@ -9777,6 +9777,11 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/capturedType.kt");
}
@TestMetadata("capturedTypeAgainstNullableInvariantType.kt")
public void testCapturedTypeAgainstNullableInvariantType() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/capturedTypeAgainstNullableInvariantType.kt");
}
@TestMetadata("capturedTypeAndApproximation.kt")
public void testCapturedTypeAndApproximation() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/capturedTypeAndApproximation.kt");
@@ -1553,6 +1553,11 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/kt18292.kt", "kotlin.coroutines");
}
@TestMetadata("kt28658.kt")
public void testKt28658() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/kt28658.kt");
}
@TestMetadata("lambdaExpectedType.kt")
public void testLambdaExpectedType() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/lambdaExpectedType.kt");
@@ -1553,6 +1553,11 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/kt18292.kt", "kotlin.coroutines");
}
@TestMetadata("kt28658.kt")
public void testKt28658() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/kt28658.kt");
}
@TestMetadata("lambdaExpectedType.kt")
public void testLambdaExpectedType() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/lambdaExpectedType.kt");
@@ -9772,6 +9772,11 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing
runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/capturedType.kt");
}
@TestMetadata("capturedTypeAgainstNullableInvariantType.kt")
public void testCapturedTypeAgainstNullableInvariantType() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/capturedTypeAgainstNullableInvariantType.kt");
}
@TestMetadata("capturedTypeAndApproximation.kt")
public void testCapturedTypeAndApproximation() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/capturedTypeAndApproximation.kt");