FE: split one more test "buildList type argument is inferred into upper bound"
Related to KT-48445, KT-56169
This commit is contained in:
committed by
Space Team
parent
97bec59bc9
commit
980ab41ef1
+12
-6
@@ -36948,6 +36948,18 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag
|
|||||||
runTest("compiler/testData/diagnostics/testsWithStdLib/builderInference/buildListToUpperBoundForbidden.kt");
|
runTest("compiler/testData/diagnostics/testsWithStdLib/builderInference/buildListToUpperBoundForbidden.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("buildListToUpperBoundInLazy.kt")
|
||||||
|
public void testBuildListToUpperBoundInLazy() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/testsWithStdLib/builderInference/buildListToUpperBoundInLazy.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("buildListToUpperBoundInLazyForbidden.kt")
|
||||||
|
public void testBuildListToUpperBoundInLazyForbidden() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/testsWithStdLib/builderInference/buildListToUpperBoundInLazyForbidden.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("completeIrrelevantCalls.kt")
|
@TestMetadata("completeIrrelevantCalls.kt")
|
||||||
public void testCompleteIrrelevantCalls() throws Exception {
|
public void testCompleteIrrelevantCalls() throws Exception {
|
||||||
@@ -36972,12 +36984,6 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag
|
|||||||
runTest("compiler/testData/diagnostics/testsWithStdLib/builderInference/inferCoroutineTypeInOldVersion.kt");
|
runTest("compiler/testData/diagnostics/testsWithStdLib/builderInference/inferCoroutineTypeInOldVersion.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
@TestMetadata("kt48445.kt")
|
|
||||||
public void testKt48445() throws Exception {
|
|
||||||
runTest("compiler/testData/diagnostics/testsWithStdLib/builderInference/kt48445.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("resolveUsualCallWithBuilderInference.kt")
|
@TestMetadata("resolveUsualCallWithBuilderInference.kt")
|
||||||
public void testResolveUsualCallWithBuilderInference() throws Exception {
|
public void testResolveUsualCallWithBuilderInference() throws Exception {
|
||||||
|
|||||||
+12
-6
@@ -36948,6 +36948,18 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
|
|||||||
runTest("compiler/testData/diagnostics/testsWithStdLib/builderInference/buildListToUpperBoundForbidden.kt");
|
runTest("compiler/testData/diagnostics/testsWithStdLib/builderInference/buildListToUpperBoundForbidden.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("buildListToUpperBoundInLazy.kt")
|
||||||
|
public void testBuildListToUpperBoundInLazy() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/testsWithStdLib/builderInference/buildListToUpperBoundInLazy.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("buildListToUpperBoundInLazyForbidden.kt")
|
||||||
|
public void testBuildListToUpperBoundInLazyForbidden() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/testsWithStdLib/builderInference/buildListToUpperBoundInLazyForbidden.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("completeIrrelevantCalls.kt")
|
@TestMetadata("completeIrrelevantCalls.kt")
|
||||||
public void testCompleteIrrelevantCalls() throws Exception {
|
public void testCompleteIrrelevantCalls() throws Exception {
|
||||||
@@ -36972,12 +36984,6 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
|
|||||||
runTest("compiler/testData/diagnostics/testsWithStdLib/builderInference/inferCoroutineTypeInOldVersion.kt");
|
runTest("compiler/testData/diagnostics/testsWithStdLib/builderInference/inferCoroutineTypeInOldVersion.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
@TestMetadata("kt48445.kt")
|
|
||||||
public void testKt48445() throws Exception {
|
|
||||||
runTest("compiler/testData/diagnostics/testsWithStdLib/builderInference/kt48445.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("resolveUsualCallWithBuilderInference.kt")
|
@TestMetadata("resolveUsualCallWithBuilderInference.kt")
|
||||||
public void testResolveUsualCallWithBuilderInference() throws Exception {
|
public void testResolveUsualCallWithBuilderInference() throws Exception {
|
||||||
|
|||||||
+12
-6
@@ -37044,6 +37044,18 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
|
|||||||
runTest("compiler/testData/diagnostics/testsWithStdLib/builderInference/buildListToUpperBoundForbidden.kt");
|
runTest("compiler/testData/diagnostics/testsWithStdLib/builderInference/buildListToUpperBoundForbidden.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("buildListToUpperBoundInLazy.kt")
|
||||||
|
public void testBuildListToUpperBoundInLazy() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/testsWithStdLib/builderInference/buildListToUpperBoundInLazy.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("buildListToUpperBoundInLazyForbidden.kt")
|
||||||
|
public void testBuildListToUpperBoundInLazyForbidden() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/testsWithStdLib/builderInference/buildListToUpperBoundInLazyForbidden.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("completeIrrelevantCalls.kt")
|
@TestMetadata("completeIrrelevantCalls.kt")
|
||||||
public void testCompleteIrrelevantCalls() throws Exception {
|
public void testCompleteIrrelevantCalls() throws Exception {
|
||||||
@@ -37068,12 +37080,6 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
|
|||||||
runTest("compiler/testData/diagnostics/testsWithStdLib/builderInference/inferCoroutineTypeInOldVersion.kt");
|
runTest("compiler/testData/diagnostics/testsWithStdLib/builderInference/inferCoroutineTypeInOldVersion.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
@TestMetadata("kt48445.kt")
|
|
||||||
public void testKt48445() throws Exception {
|
|
||||||
runTest("compiler/testData/diagnostics/testsWithStdLib/builderInference/kt48445.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("resolveUsualCallWithBuilderInference.kt")
|
@TestMetadata("resolveUsualCallWithBuilderInference.kt")
|
||||||
public void testResolveUsualCallWithBuilderInference() throws Exception {
|
public void testResolveUsualCallWithBuilderInference() throws Exception {
|
||||||
|
|||||||
Vendored
+64
@@ -0,0 +1,64 @@
|
|||||||
|
// !LANGUAGE: +UnrestrictedBuilderInference -ForbidInferringPostponedTypeVariableIntoDeclaredUpperBound
|
||||||
|
// ISSUE: KT-48445
|
||||||
|
|
||||||
|
internal class TowerDataElementsForName() {
|
||||||
|
val reversedFilteredLocalScopes by lazy(LazyThreadSafetyMode.NONE) {
|
||||||
|
@OptIn(ExperimentalStdlibApi::class)
|
||||||
|
buildList {
|
||||||
|
for (i in lastIndex downTo 0) {
|
||||||
|
add("")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal class TowerDataElementsForName2() {
|
||||||
|
@OptIn(ExperimentalStdlibApi::class)
|
||||||
|
val reversedFilteredLocalScopes = buildList {
|
||||||
|
val reversedFilteredLocalScopes by lazy(LazyThreadSafetyMode.NONE) {
|
||||||
|
@OptIn(ExperimentalStdlibApi::class)
|
||||||
|
buildList {
|
||||||
|
for (i in lastIndex downTo 0) {
|
||||||
|
add("")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
add(reversedFilteredLocalScopes)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal class TowerDataElementsForName3() {
|
||||||
|
val reversedFilteredLocalScopes by <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>lazy<!>(LazyThreadSafetyMode.NONE) {
|
||||||
|
@OptIn(ExperimentalStdlibApi::class)
|
||||||
|
<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>buildList<!> l1@ {
|
||||||
|
for (i in lastIndex downTo 0) {
|
||||||
|
val reversedFilteredLocalScopes by lazy(LazyThreadSafetyMode.NONE) {
|
||||||
|
@OptIn(ExperimentalStdlibApi::class)
|
||||||
|
buildList {
|
||||||
|
for (i in lastIndex downTo 0) {
|
||||||
|
add("")
|
||||||
|
this@l1.add("")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal class TowerDataElementsForName4() {
|
||||||
|
@OptIn(ExperimentalStdlibApi::class)
|
||||||
|
val reversedFilteredLocalScopes = <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>buildList<!> l1@ {
|
||||||
|
class Foo {
|
||||||
|
val reversedFilteredLocalScopes by lazy(LazyThreadSafetyMode.NONE) {
|
||||||
|
@OptIn(ExperimentalStdlibApi::class)
|
||||||
|
buildList {
|
||||||
|
for (i in lastIndex downTo 0) {
|
||||||
|
add("")
|
||||||
|
this@l1.add("")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Vendored
+64
@@ -0,0 +1,64 @@
|
|||||||
|
// !LANGUAGE: +UnrestrictedBuilderInference -ForbidInferringPostponedTypeVariableIntoDeclaredUpperBound
|
||||||
|
// ISSUE: KT-48445
|
||||||
|
|
||||||
|
internal class TowerDataElementsForName() {
|
||||||
|
val reversedFilteredLocalScopes by lazy(LazyThreadSafetyMode.NONE) {
|
||||||
|
@OptIn(ExperimentalStdlibApi::class)
|
||||||
|
buildList {
|
||||||
|
for (i in lastIndex downTo 0) {
|
||||||
|
add("")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal class TowerDataElementsForName2() {
|
||||||
|
@OptIn(ExperimentalStdlibApi::class)
|
||||||
|
val reversedFilteredLocalScopes = buildList {
|
||||||
|
val reversedFilteredLocalScopes by lazy(LazyThreadSafetyMode.NONE) {
|
||||||
|
@OptIn(ExperimentalStdlibApi::class)
|
||||||
|
buildList {
|
||||||
|
for (i in lastIndex downTo 0) {
|
||||||
|
add("")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
add(reversedFilteredLocalScopes)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal class TowerDataElementsForName3() {
|
||||||
|
val reversedFilteredLocalScopes by lazy(LazyThreadSafetyMode.NONE) {
|
||||||
|
@OptIn(ExperimentalStdlibApi::class)
|
||||||
|
buildList l1@ {
|
||||||
|
for (i in lastIndex downTo 0) {
|
||||||
|
val reversedFilteredLocalScopes by lazy(LazyThreadSafetyMode.NONE) {
|
||||||
|
@OptIn(ExperimentalStdlibApi::class)
|
||||||
|
buildList {
|
||||||
|
for (<!NAME_SHADOWING!>i<!> in lastIndex downTo 0) {
|
||||||
|
add("")
|
||||||
|
this@l1.add("")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal class TowerDataElementsForName4() {
|
||||||
|
@OptIn(ExperimentalStdlibApi::class)
|
||||||
|
val reversedFilteredLocalScopes = <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>buildList<!> l1@ {
|
||||||
|
class Foo {
|
||||||
|
val reversedFilteredLocalScopes by lazy(LazyThreadSafetyMode.NONE) {
|
||||||
|
@OptIn(ExperimentalStdlibApi::class)
|
||||||
|
buildList {
|
||||||
|
for (i in lastIndex downTo 0) {
|
||||||
|
add("")
|
||||||
|
this@l1.add("")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+2
-2
@@ -1,5 +1,5 @@
|
|||||||
// !LANGUAGE: +UnrestrictedBuilderInference
|
// !LANGUAGE: +UnrestrictedBuilderInference +ForbidInferringPostponedTypeVariableIntoDeclaredUpperBound
|
||||||
// SKIP_TXT
|
// ISSUE: KT-56169
|
||||||
|
|
||||||
internal class TowerDataElementsForName() {
|
internal class TowerDataElementsForName() {
|
||||||
val reversedFilteredLocalScopes by lazy(LazyThreadSafetyMode.NONE) {
|
val reversedFilteredLocalScopes by lazy(LazyThreadSafetyMode.NONE) {
|
||||||
+2
-2
@@ -1,5 +1,5 @@
|
|||||||
// !LANGUAGE: +UnrestrictedBuilderInference
|
// !LANGUAGE: +UnrestrictedBuilderInference +ForbidInferringPostponedTypeVariableIntoDeclaredUpperBound
|
||||||
// SKIP_TXT
|
// ISSUE: KT-56169
|
||||||
|
|
||||||
internal class TowerDataElementsForName() {
|
internal class TowerDataElementsForName() {
|
||||||
val reversedFilteredLocalScopes by lazy(LazyThreadSafetyMode.NONE) {
|
val reversedFilteredLocalScopes by lazy(LazyThreadSafetyMode.NONE) {
|
||||||
Generated
+12
-6
@@ -37044,6 +37044,18 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
|||||||
runTest("compiler/testData/diagnostics/testsWithStdLib/builderInference/buildListToUpperBoundForbidden.kt");
|
runTest("compiler/testData/diagnostics/testsWithStdLib/builderInference/buildListToUpperBoundForbidden.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("buildListToUpperBoundInLazy.kt")
|
||||||
|
public void testBuildListToUpperBoundInLazy() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/testsWithStdLib/builderInference/buildListToUpperBoundInLazy.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("buildListToUpperBoundInLazyForbidden.kt")
|
||||||
|
public void testBuildListToUpperBoundInLazyForbidden() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/testsWithStdLib/builderInference/buildListToUpperBoundInLazyForbidden.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("completeIrrelevantCalls.kt")
|
@TestMetadata("completeIrrelevantCalls.kt")
|
||||||
public void testCompleteIrrelevantCalls() throws Exception {
|
public void testCompleteIrrelevantCalls() throws Exception {
|
||||||
@@ -37068,12 +37080,6 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
|||||||
runTest("compiler/testData/diagnostics/testsWithStdLib/builderInference/inferCoroutineTypeInOldVersion.kt");
|
runTest("compiler/testData/diagnostics/testsWithStdLib/builderInference/inferCoroutineTypeInOldVersion.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
@TestMetadata("kt48445.kt")
|
|
||||||
public void testKt48445() throws Exception {
|
|
||||||
runTest("compiler/testData/diagnostics/testsWithStdLib/builderInference/kt48445.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("resolveUsualCallWithBuilderInference.kt")
|
@TestMetadata("resolveUsualCallWithBuilderInference.kt")
|
||||||
public void testResolveUsualCallWithBuilderInference() throws Exception {
|
public void testResolveUsualCallWithBuilderInference() throws Exception {
|
||||||
|
|||||||
Reference in New Issue
Block a user