Don't use builder inference if possible
The builder inference is running only if there are still uninferred type variables ^KT-48193 Fixed
This commit is contained in:
committed by
TeamCityServer
parent
3df5667a4b
commit
55811c8851
+6
@@ -13326,6 +13326,12 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/builderInference"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("changingResolveIfDontUseBuilderInference.kt")
|
||||
public void testChangingResolveIfDontUseBuilderInference() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/inference/builderInference/changingResolveIfDontUseBuilderInference.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt47744.kt")
|
||||
public void testKt47744() throws Exception {
|
||||
|
||||
+6
@@ -13326,6 +13326,12 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/builderInference"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("changingResolveIfDontUseBuilderInference.kt")
|
||||
public void testChangingResolveIfDontUseBuilderInference() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/inference/builderInference/changingResolveIfDontUseBuilderInference.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt47744.kt")
|
||||
public void testKt47744() throws Exception {
|
||||
|
||||
+24
-12
@@ -18019,6 +18019,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
||||
runTest("compiler/testData/codegen/box/inference/builderInference/capturedTypes.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("changingResolveIfDontUseBuilderInferenceDisabledFeature.kt")
|
||||
public void testChangingResolveIfDontUseBuilderInferenceDisabledFeature() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inference/builderInference/changingResolveIfDontUseBuilderInferenceDisabledFeature.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("commonSuperType.kt")
|
||||
public void testCommonSuperType() throws Exception {
|
||||
@@ -18055,6 +18061,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
||||
runTest("compiler/testData/codegen/box/inference/builderInference/constraintsBetweenTwoStubVariables.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("cstBasedOnTwoBuilderInferenceLambda.kt")
|
||||
public void testCstBasedOnTwoBuilderInferenceLambda() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inference/builderInference/cstBasedOnTwoBuilderInferenceLambda.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("inferFromExpectedType.kt")
|
||||
public void testInferFromExpectedType() throws Exception {
|
||||
@@ -18139,18 +18151,6 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
||||
runTest("compiler/testData/codegen/box/inference/builderInference/specialCallsWithCallableReferences.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("specialCallsWithCallableReferencesDontCareTypeInBlockExpression.kt")
|
||||
public void testSpecialCallsWithCallableReferencesDontCareTypeInBlockExpression() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inference/builderInference/specialCallsWithCallableReferencesDontCareTypeInBlockExpression.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("specialCallsWithCallableReferencesDontCareTypeInBlockExression.kt")
|
||||
public void testSpecialCallsWithCallableReferencesDontCareTypeInBlockExression() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inference/builderInference/specialCallsWithCallableReferencesDontCareTypeInBlockExression.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("specialCallsWithCallableReferencesDontRewriteAtSlice.kt")
|
||||
public void testSpecialCallsWithCallableReferencesDontRewriteAtSlice() throws Exception {
|
||||
@@ -18228,6 +18228,18 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
||||
public void testWithExpectedType() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inference/builderInference/withExpectedType.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("withoutAnnotation.kt")
|
||||
public void testWithoutAnnotation() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inference/builderInference/withoutAnnotation.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("withoutAnnotationDisabledFeature.kt")
|
||||
public void testWithoutAnnotationDisabledFeature() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inference/builderInference/withoutAnnotationDisabledFeature.kt");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
@@ -25,6 +25,7 @@ interface ConstraintSystemCompletionContext : VariableFixationFinder.Context, Re
|
||||
fun canBeProper(type: KotlinTypeMarker): Boolean
|
||||
|
||||
fun containsOnlyFixedOrPostponedVariables(type: KotlinTypeMarker): Boolean
|
||||
fun containsOnlyFixedVariables(type: KotlinTypeMarker): Boolean
|
||||
|
||||
// mutable operations
|
||||
fun addError(error: ConstraintSystemError)
|
||||
|
||||
+8
@@ -482,6 +482,14 @@ class NewConstraintSystemImpl(
|
||||
}
|
||||
}
|
||||
|
||||
override fun containsOnlyFixedVariables(type: KotlinTypeMarker): Boolean {
|
||||
checkState(State.BUILDING, State.COMPLETION)
|
||||
return !type.contains {
|
||||
val typeConstructor = it.typeConstructor()
|
||||
storage.notFixedTypeVariables.containsKey(typeConstructor)
|
||||
}
|
||||
}
|
||||
|
||||
// PostponedArgumentsAnalyzer.Context
|
||||
override fun buildCurrentSubstitutor(): TypeSubstitutorMarker {
|
||||
checkState(State.BUILDING, State.COMPLETION, State.TRANSACTION)
|
||||
|
||||
+5
@@ -7,6 +7,7 @@ package org.jetbrains.kotlin.resolve.calls.components
|
||||
|
||||
import org.jetbrains.kotlin.builtins.UnsignedTypes
|
||||
import org.jetbrains.kotlin.builtins.getReceiverTypeFromFunctionType
|
||||
import org.jetbrains.kotlin.config.LanguageFeature
|
||||
import org.jetbrains.kotlin.descriptors.*
|
||||
import org.jetbrains.kotlin.descriptors.impl.TypeAliasConstructorDescriptor
|
||||
import org.jetbrains.kotlin.resolve.calls.components.TypeArgumentsToParametersMapper.TypeArgumentsMapping.NoExplicitArguments
|
||||
@@ -274,11 +275,15 @@ internal object PostponedVariablesInitializerResolutionPart : ResolutionPart() {
|
||||
for ((argument, parameter) in resolvedCall.argumentToCandidateParameter) {
|
||||
if (!callComponents.statelessCallbacks.isBuilderInferenceCall(argument, parameter)) continue
|
||||
val receiverType = parameter.type.getReceiverTypeFromFunctionType() ?: continue
|
||||
val dontUseBuilderInferenceIfPossible =
|
||||
callComponents.languageVersionSettings.supportsFeature(LanguageFeature.UseBuilderInferenceOnlyIfNeeded)
|
||||
|
||||
if (argument is LambdaKotlinCallArgument && !argument.hasBuilderInferenceAnnotation) {
|
||||
argument.hasBuilderInferenceAnnotation = true
|
||||
}
|
||||
|
||||
if (dontUseBuilderInferenceIfPossible) continue
|
||||
|
||||
for (freshVariable in resolvedCall.freshVariablesSubstitutor.freshVariables) {
|
||||
if (resolvedCall.typeArgumentMappingByOriginal.getTypeArgument(freshVariable.originalTypeParameter) is SimpleTypeArgument)
|
||||
continue
|
||||
|
||||
+67
-9
@@ -5,6 +5,8 @@
|
||||
|
||||
package org.jetbrains.kotlin.resolve.calls.inference.components
|
||||
|
||||
import org.jetbrains.kotlin.config.LanguageFeature
|
||||
import org.jetbrains.kotlin.config.LanguageVersionSettings
|
||||
import org.jetbrains.kotlin.resolve.calls.components.transformToResolvedLambda
|
||||
import org.jetbrains.kotlin.resolve.calls.inference.model.*
|
||||
import org.jetbrains.kotlin.resolve.calls.model.*
|
||||
@@ -21,6 +23,7 @@ class KotlinConstraintSystemCompleter(
|
||||
private val resultTypeResolver: ResultTypeResolver,
|
||||
val variableFixationFinder: VariableFixationFinder,
|
||||
private val postponedArgumentInputTypesResolver: PostponedArgumentInputTypesResolver,
|
||||
private val languageVersionSettings: LanguageVersionSettings
|
||||
) {
|
||||
fun runCompletion(
|
||||
c: ConstraintSystemCompletionContext,
|
||||
@@ -137,14 +140,19 @@ class KotlinConstraintSystemCompleter(
|
||||
if (fixNextReadyVariable(completionMode, topLevelAtoms, topLevelType, collectVariablesFromContext, postponedArguments))
|
||||
continue
|
||||
|
||||
// Stage 7: report "not enough information" for uninferred type variables
|
||||
// Stage 7: try to complete call with the builder inference if there are uninferred type variables
|
||||
val areThereAppearedProperConstraintsForSomeVariable =
|
||||
tryToCompleteWithBuilderInference(completionMode, topLevelType, postponedArguments, analyze)
|
||||
|
||||
if (areThereAppearedProperConstraintsForSomeVariable)
|
||||
continue
|
||||
|
||||
// Stage 8: report "not enough information" for uninferred type variables
|
||||
reportNotEnoughTypeInformation(
|
||||
completionMode, topLevelAtoms, topLevelType, collectVariablesFromContext, postponedArguments, diagnosticsHolder
|
||||
)
|
||||
if (wasFixedSomeVariable)
|
||||
continue
|
||||
|
||||
// Stage 7: force analysis of remaining not analyzed postponed arguments and rerun stages if there are
|
||||
// Stage 9: force analysis of remaining not analyzed postponed arguments and rerun stages if there are
|
||||
if (completionMode == ConstraintSystemCompletionMode.FULL) {
|
||||
if (analyzeRemainingNotAnalyzedPostponedArgument(postponedArguments, analyze))
|
||||
continue
|
||||
@@ -154,6 +162,47 @@ class KotlinConstraintSystemCompleter(
|
||||
}
|
||||
}
|
||||
|
||||
private fun ConstraintSystemCompletionContext.tryToCompleteWithBuilderInference(
|
||||
completionMode: ConstraintSystemCompletionMode,
|
||||
topLevelType: UnwrappedType,
|
||||
postponedArguments: List<PostponedResolvedAtom>,
|
||||
analyze: (PostponedResolvedAtom) -> Unit
|
||||
): Boolean {
|
||||
if (completionMode == ConstraintSystemCompletionMode.PARTIAL) return false
|
||||
|
||||
val useBuilderInferenceOnlyIfNeeded = languageVersionSettings.supportsFeature(LanguageFeature.UseBuilderInferenceOnlyIfNeeded)
|
||||
|
||||
// If we use the builder inference anyway (if the annotation is presented), then we are already analysed builder inference lambdas
|
||||
if (!useBuilderInferenceOnlyIfNeeded) return false
|
||||
|
||||
val lambdaArguments = postponedArguments.filterIsInstance<ResolvedLambdaAtom>().takeIf { it.isNotEmpty() } ?: return false
|
||||
|
||||
return lambdaArguments.any { argument ->
|
||||
if (!argument.atom.hasBuilderInferenceAnnotation)
|
||||
return@any false
|
||||
|
||||
val notFixedInputTypeVariables = argument.inputTypes
|
||||
.map { it.extractTypeVariables() }.flatten().filter { it !in fixedTypeVariables }
|
||||
|
||||
if (notFixedInputTypeVariables.isEmpty()) return@any false
|
||||
|
||||
for (variable in notFixedInputTypeVariables) {
|
||||
getBuilder().markPostponedVariable(notFixedTypeVariables.getValue(variable).typeVariable)
|
||||
}
|
||||
|
||||
analyze(argument)
|
||||
|
||||
val variableForFixation = variableFixationFinder.findFirstVariableForFixation(
|
||||
this, notFixedInputTypeVariables, postponedArguments, completionMode, topLevelType
|
||||
)
|
||||
|
||||
// continue completion (rerun stages) only if ready for fixation variables with proper constraints have appeared
|
||||
// (after analysing a lambda with the builder inference)
|
||||
// otherwise we report "not enough type information" error
|
||||
return variableForFixation?.hasProperConstraint == true
|
||||
}
|
||||
}
|
||||
|
||||
private fun transformToAtomWithNewFunctionalExpectedType(
|
||||
c: ConstraintSystemCompletionContext,
|
||||
argument: PostponedAtomWithRevisableExpectedType,
|
||||
@@ -179,10 +228,15 @@ class KotlinConstraintSystemCompleter(
|
||||
postponedArguments: List<PostponedResolvedAtom>,
|
||||
analyze: (PostponedResolvedAtom) -> Unit
|
||||
): Boolean {
|
||||
val argumentWithFixedOrPostponedInputTypes = findPostponedArgumentWithFixedOrPostponedInputTypes(postponedArguments)
|
||||
val useBuilderInferenceOnlyIfNeeded = languageVersionSettings.supportsFeature(LanguageFeature.UseBuilderInferenceOnlyIfNeeded)
|
||||
val argumentToAnalyze = if (useBuilderInferenceOnlyIfNeeded) {
|
||||
findPostponedArgumentWithFixedInputTypes(postponedArguments)
|
||||
} else {
|
||||
findPostponedArgumentWithFixedOrPostponedInputTypes(postponedArguments)
|
||||
}
|
||||
|
||||
if (argumentWithFixedOrPostponedInputTypes != null) {
|
||||
analyze(argumentWithFixedOrPostponedInputTypes)
|
||||
if (argumentToAnalyze != null) {
|
||||
analyze(argumentToAnalyze)
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -252,8 +306,12 @@ class KotlinConstraintSystemCompleter(
|
||||
private fun findPostponedArgumentWithRevisableExpectedType(postponedArguments: List<PostponedResolvedAtom>) =
|
||||
postponedArguments.firstOrNull { argument -> argument is PostponedAtomWithRevisableExpectedType }
|
||||
|
||||
private fun ConstraintSystemCompletionContext.findPostponedArgumentWithFixedOrPostponedInputTypes(postponedArguments: List<PostponedResolvedAtom>) =
|
||||
postponedArguments.firstOrNull { argument -> argument.inputTypes.all { containsOnlyFixedOrPostponedVariables(it) } }
|
||||
private fun ConstraintSystemCompletionContext.findPostponedArgumentWithFixedOrPostponedInputTypes(
|
||||
postponedArguments: List<PostponedResolvedAtom>
|
||||
) = postponedArguments.firstOrNull { argument -> argument.inputTypes.all { containsOnlyFixedOrPostponedVariables(it) } }
|
||||
|
||||
private fun ConstraintSystemCompletionContext.findPostponedArgumentWithFixedInputTypes(postponedArguments: List<PostponedResolvedAtom>) =
|
||||
postponedArguments.firstOrNull { argument -> argument.inputTypes.all { containsOnlyFixedVariables(it) } }
|
||||
|
||||
private fun fixVariable(
|
||||
c: ConstraintSystemCompletionContext,
|
||||
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
// WITH_RUNTIME
|
||||
// DONT_TARGET_EXACT_BACKEND: WASM
|
||||
// !LANGUAGE: -UseBuilderInferenceOnlyIfNeeded
|
||||
|
||||
import kotlin.experimental.ExperimentalTypeInference
|
||||
|
||||
@OptIn(ExperimentalTypeInference::class)
|
||||
fun <K, V> buildMap(@BuilderInference builderAction: MutableMap<K, V>.() -> Unit): Map<K, V> = mapOf()
|
||||
|
||||
fun foo(): MutableMap<CharSequence, *> = mutableMapOf<CharSequence, String>()
|
||||
|
||||
fun <E> MutableMap<E, *>.swap(x: MutableMap<E, *>) {}
|
||||
|
||||
@OptIn(ExperimentalStdlibApi::class)
|
||||
fun box(): String {
|
||||
val x: Map<in String, String> = buildMap {
|
||||
put("", "")
|
||||
swap(foo())
|
||||
} // `Map<CharSequence, String>` if we use builder inference, `Map<String, String>` if we don't
|
||||
return "OK"
|
||||
}
|
||||
Vendored
-32
@@ -28,20 +28,6 @@ fun poll01(): Flow<String> {
|
||||
}
|
||||
}
|
||||
|
||||
fun poll1(flag: Boolean): Flow<String> {
|
||||
return flow {
|
||||
val inv = if (flag) { ::bar2 } else { ::foo2 }
|
||||
inv()
|
||||
}
|
||||
}
|
||||
|
||||
fun poll11(flag: Boolean): Flow<String> {
|
||||
return flow {
|
||||
val inv = if (flag) { ::bar2 } else { ::foo2 }
|
||||
inv()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fun poll21(flag: Boolean): Flow<String> {
|
||||
return flow {
|
||||
@@ -57,20 +43,6 @@ fun poll31(flag: Boolean): Flow<String> {
|
||||
}
|
||||
}
|
||||
|
||||
fun poll41(): Flow<String> {
|
||||
return flow {
|
||||
val inv = try { ::bar2 } finally { ::foo2 }
|
||||
inv()
|
||||
}
|
||||
}
|
||||
|
||||
fun poll51(): Flow<String> {
|
||||
return flow {
|
||||
val inv = try { ::bar2 } catch (e: Exception) { ::foo2 } finally { ::foo2 }
|
||||
inv()
|
||||
}
|
||||
}
|
||||
|
||||
fun poll61(): Flow<String> {
|
||||
return flow {
|
||||
val inv = ::bar2
|
||||
@@ -101,12 +73,8 @@ fun poll91(): Flow<String> {
|
||||
|
||||
fun box(): String {
|
||||
poll01()
|
||||
poll1(true)
|
||||
poll11(true)
|
||||
poll21(true)
|
||||
poll31(true)
|
||||
poll41()
|
||||
poll51()
|
||||
poll61()
|
||||
poll71()
|
||||
poll81()
|
||||
|
||||
-55
@@ -1,55 +0,0 @@
|
||||
// WITH_RUNTIME
|
||||
// DONT_TARGET_EXACT_BACKEND: WASM
|
||||
|
||||
import kotlin.experimental.ExperimentalTypeInference
|
||||
|
||||
fun <K> FlowCollector<K>.bar(): K = null as K
|
||||
fun <K> FlowCollector<K>.foo(): K = null as K
|
||||
|
||||
fun bar2(): Int = 1
|
||||
fun foo2(): Float = 1f
|
||||
|
||||
fun <T> materialize() = null as T
|
||||
|
||||
interface FlowCollector<in T> {}
|
||||
|
||||
@Suppress("EXPERIMENTAL_API_USAGE_ERROR")
|
||||
fun <L> flow(@BuilderInference block: suspend FlowCollector<L>.() -> Unit) = Flow(block)
|
||||
|
||||
class Flow<out R>(private val block: suspend FlowCollector<R>.() -> Unit)
|
||||
|
||||
fun poll1(flag: Boolean): Flow<String> {
|
||||
return flow {
|
||||
val inv = if (flag) { ::bar2 } else { ::foo2 }
|
||||
inv()
|
||||
}
|
||||
}
|
||||
|
||||
fun poll11(flag: Boolean): Flow<String> {
|
||||
return flow {
|
||||
val inv = if (flag) { ::bar2 } else { ::foo2 }
|
||||
inv()
|
||||
}
|
||||
}
|
||||
|
||||
fun poll41(): Flow<String> {
|
||||
return flow {
|
||||
val inv = try { ::bar2 } finally { ::foo2 }
|
||||
inv()
|
||||
}
|
||||
}
|
||||
|
||||
fun poll51(): Flow<String> {
|
||||
return flow {
|
||||
val inv = try { ::bar2 } catch (e: Exception) { ::foo2 } finally { ::foo2 }
|
||||
inv()
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
poll1(true)
|
||||
poll11(true)
|
||||
poll41()
|
||||
poll51()
|
||||
return "OK"
|
||||
}
|
||||
-174
@@ -1,174 +0,0 @@
|
||||
// !LANGUAGE: +UnrestrictedBuilderInference
|
||||
// WITH_RUNTIME
|
||||
// SKIP_TXT
|
||||
// DONT_TARGET_EXACT_BACKEND: WASM
|
||||
// IGNORE_LIGHT_ANALYSIS
|
||||
// IGNORE_BACKEND: JVM
|
||||
|
||||
import kotlin.experimental.ExperimentalTypeInference
|
||||
|
||||
fun <K> FlowCollector<K>.bar(): K = null as K
|
||||
fun <K> FlowCollector<K>.foo(): K = null as K
|
||||
|
||||
fun <K> K.bar3(): K = null as K
|
||||
fun <K> K.foo3(): K = null as K
|
||||
|
||||
fun bar2(): Int = 1
|
||||
fun foo2(): Float = 1f
|
||||
|
||||
val bar4: Int
|
||||
get() = 1
|
||||
|
||||
var foo4: Float
|
||||
get() = 1f
|
||||
set(value) {}
|
||||
|
||||
val <K> FlowCollector<K>.bar5: K get() = null as K
|
||||
val <K> FlowCollector<K>.foo5: K get() = null as K
|
||||
|
||||
class Foo6
|
||||
|
||||
class Foo7<T>
|
||||
fun foo7() = null as Foo7<Int>
|
||||
|
||||
interface FlowCollector<in T> {}
|
||||
|
||||
@OptIn(ExperimentalTypeInference::class)
|
||||
fun <L> flow(@BuilderInference block: suspend FlowCollector<L>.() -> Unit) = Flow(block)
|
||||
|
||||
class Flow<out R>(private val block: suspend FlowCollector<R>.() -> Unit)
|
||||
|
||||
//fun poll1(flag: Boolean): Flow<String> {
|
||||
// return flow {
|
||||
// val inv = if (flag) { ::bar2 } else { ::foo2 }
|
||||
// inv()
|
||||
// }
|
||||
//}
|
||||
//
|
||||
//fun poll11(flag: Boolean): Flow<String> {
|
||||
// return flow {
|
||||
// val inv = if (flag) { ::bar2 } else { ::foo2 }
|
||||
// inv()
|
||||
// }
|
||||
//}
|
||||
|
||||
fun poll12(flag: Boolean): Flow<String> {
|
||||
return flow {
|
||||
val inv = if (flag) { ::bar3 } else { ::foo3 }
|
||||
inv()
|
||||
}
|
||||
}
|
||||
|
||||
//fun poll13(flag: Boolean): Flow<String> {
|
||||
// return flow {
|
||||
// val inv = if (flag) { ::bar2 } else { ::foo3 }
|
||||
// inv()
|
||||
// }
|
||||
//}
|
||||
//
|
||||
//fun poll14(flag: Boolean): Flow<String> {
|
||||
// return flow {
|
||||
// val inv = if (flag) { ::bar4 } else { ::foo4 }
|
||||
// inv()
|
||||
// }
|
||||
//}
|
||||
//
|
||||
//fun poll15(flag: Boolean): Flow<String> {
|
||||
// return flow {
|
||||
// val inv = if (flag) { ::bar5 } else { ::foo5 }
|
||||
// inv()
|
||||
// }
|
||||
//}
|
||||
//
|
||||
//fun poll16(flag: Boolean): Flow<String> {
|
||||
// return flow {
|
||||
// val inv = if (flag) { ::Foo6 } else { ::Foo6 }
|
||||
// inv()
|
||||
// }
|
||||
//}
|
||||
//
|
||||
//fun poll4(): Flow<String> {
|
||||
// return flow {
|
||||
// val inv = try { ::bar } finally { ::foo }
|
||||
// inv()
|
||||
// }
|
||||
//}
|
||||
//
|
||||
//fun poll41(): Flow<String> {
|
||||
// return flow {
|
||||
// val inv = try { ::bar2 } finally { ::foo2 }
|
||||
// inv()
|
||||
// }
|
||||
//}
|
||||
//
|
||||
//fun poll42(): Flow<String> {
|
||||
// return flow {
|
||||
// val inv = try { ::bar3 } finally { ::foo3 }
|
||||
// inv()
|
||||
// }
|
||||
//}
|
||||
//
|
||||
//fun poll43(): Flow<String> {
|
||||
// return flow {
|
||||
// val inv = try { ::bar4 } finally { ::foo4 }
|
||||
// inv()
|
||||
// }
|
||||
//}
|
||||
//
|
||||
//fun poll44(): Flow<String> {
|
||||
// return flow {
|
||||
// val inv = try { ::bar5 } finally { ::foo5 }
|
||||
// inv()
|
||||
// }
|
||||
//}
|
||||
//
|
||||
//fun poll45(): Flow<String> {
|
||||
// return flow {
|
||||
// val inv = try { ::Foo6 } finally { ::Foo6 }
|
||||
// inv()
|
||||
// }
|
||||
//}
|
||||
//
|
||||
//fun poll5(): Flow<String> {
|
||||
// return flow {
|
||||
// val inv = try { ::bar } catch (e: Exception) { ::foo } finally { ::foo }
|
||||
// inv()
|
||||
// }
|
||||
//}
|
||||
//
|
||||
//fun poll51(): Flow<String> {
|
||||
// return flow {
|
||||
// val inv = try { ::bar2 } catch (e: Exception) { ::foo2 } finally { ::foo2 }
|
||||
// inv()
|
||||
// }
|
||||
//}
|
||||
//
|
||||
//fun poll52(): Flow<String> {
|
||||
// return flow {
|
||||
// val inv = try { ::bar3 } catch (e: Exception) { ::foo3 } finally { ::foo3 }
|
||||
// inv()
|
||||
// }
|
||||
//}
|
||||
//
|
||||
//fun poll53(): Flow<String> {
|
||||
// return flow {
|
||||
// val inv = try { ::bar4 } catch (e: Exception) { ::foo4 } finally { ::foo4 }
|
||||
// inv()
|
||||
// }
|
||||
//}
|
||||
//
|
||||
//fun poll54(): Flow<String> {
|
||||
// return flow {
|
||||
// val inv = try { ::bar5 } catch (e: Exception) { ::foo5 } finally { ::foo5 }
|
||||
// inv()
|
||||
// }
|
||||
//}
|
||||
//
|
||||
//fun poll55(): Flow<String> {
|
||||
// return flow {
|
||||
// val inv = try { ::Foo6 } catch (e: Exception) { ::Foo6 } finally { ::Foo6 }
|
||||
// inv()
|
||||
// }
|
||||
//}
|
||||
|
||||
fun box() = "OK"
|
||||
-32
@@ -28,20 +28,6 @@ fun poll01(): Flow<String> {
|
||||
}
|
||||
}
|
||||
|
||||
fun poll1(flag: Boolean): Flow<String> {
|
||||
return flow {
|
||||
val inv = if (flag) { ::bar2 } else { ::foo2 }
|
||||
inv()
|
||||
}
|
||||
}
|
||||
|
||||
fun poll11(flag: Boolean): Flow<String> {
|
||||
return flow {
|
||||
val inv = if (flag) { ::bar2 } else { ::foo2 }
|
||||
inv()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fun poll21(flag: Boolean): Flow<String> {
|
||||
return flow {
|
||||
@@ -57,20 +43,6 @@ fun poll31(flag: Boolean): Flow<String> {
|
||||
}
|
||||
}
|
||||
|
||||
fun poll41(): Flow<String> {
|
||||
return flow {
|
||||
val inv = try { ::bar2 } finally { ::foo2 }
|
||||
inv()
|
||||
}
|
||||
}
|
||||
|
||||
fun poll51(): Flow<String> {
|
||||
return flow {
|
||||
val inv = try { ::bar2 } catch (e: Exception) { ::foo2 } finally { ::foo2 }
|
||||
inv()
|
||||
}
|
||||
}
|
||||
|
||||
fun poll61(): Flow<String> {
|
||||
return flow {
|
||||
val inv = ::bar2
|
||||
@@ -101,12 +73,8 @@ fun poll91(): Flow<String> {
|
||||
|
||||
fun box(): String {
|
||||
poll01()
|
||||
poll1(true)
|
||||
poll11(true)
|
||||
poll21(true)
|
||||
poll31(true)
|
||||
poll41()
|
||||
poll51()
|
||||
poll61()
|
||||
poll71()
|
||||
poll81()
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// !LANGUAGE: +UnrestrictedBuilderInference
|
||||
// !LANGUAGE: +UnrestrictedBuilderInference -UseBuilderInferenceOnlyIfNeeded
|
||||
// WITH_RUNTIME
|
||||
// !DIAGNOSTICS: -EXPERIMENTAL_API_USAGE_ERROR -CAST_NEVER_SUCCEEDS
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
// WITH_RUNTIME
|
||||
// !DIAGNOSTICS: -EXPERIMENTAL_IS_NOT_ENABLED -DEPRECATION -EXPERIMENTAL_API_USAGE_ERROR
|
||||
// DONT_TARGET_EXACT_BACKEND: WASM
|
||||
|
||||
import kotlin.experimental.ExperimentalTypeInference
|
||||
|
||||
@OptIn(ExperimentalTypeInference::class)
|
||||
fun <K, V> buildMap(@BuilderInference builderAction: MutableMap<K, V>.() -> Unit): Map<K, V> = mapOf()
|
||||
|
||||
fun foo(): MutableMap<CharSequence, *> = mutableMapOf<CharSequence, String>()
|
||||
|
||||
fun <E> MutableMap<E, *>.swap(x: MutableMap<E, *>) {}
|
||||
|
||||
@UseExperimental(ExperimentalTypeInference::class)
|
||||
fun <K : V, V : CharSequence> build7(@BuilderInference builderAction: MutableMap<K, V>.() -> MutableMap<String, V>) = mutableMapOf<String, V>()
|
||||
|
||||
fun <K> id(x: K): K = x
|
||||
|
||||
@OptIn(ExperimentalStdlibApi::class)
|
||||
fun main() {
|
||||
val x: Map<in String, String> = buildMap {
|
||||
put("", "")
|
||||
swap(foo())
|
||||
} // `Map<CharSequence, String>` if we use builder inference, `Map<String, String>` if we don't
|
||||
|
||||
val y: MutableMap<String, CharSequence> = build7 {
|
||||
<!ARGUMENT_TYPE_MISMATCH!>id(run { this })<!>
|
||||
}
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
// WITH_RUNTIME
|
||||
// !DIAGNOSTICS: -EXPERIMENTAL_IS_NOT_ENABLED -DEPRECATION -EXPERIMENTAL_API_USAGE_ERROR
|
||||
// DONT_TARGET_EXACT_BACKEND: WASM
|
||||
|
||||
import kotlin.experimental.ExperimentalTypeInference
|
||||
|
||||
@OptIn(ExperimentalTypeInference::class)
|
||||
fun <K, V> buildMap(@BuilderInference builderAction: MutableMap<K, V>.() -> Unit): Map<K, V> = mapOf()
|
||||
|
||||
fun foo(): MutableMap<CharSequence, *> = mutableMapOf<CharSequence, String>()
|
||||
|
||||
fun <E> MutableMap<E, *>.swap(x: MutableMap<E, *>) {}
|
||||
|
||||
@UseExperimental(ExperimentalTypeInference::class)
|
||||
fun <K : V, V : CharSequence> build7(@BuilderInference builderAction: MutableMap<K, V>.() -> MutableMap<String, V>) = mutableMapOf<String, V>()
|
||||
|
||||
fun <K> id(x: K): K = x
|
||||
|
||||
@OptIn(ExperimentalStdlibApi::class)
|
||||
fun main() {
|
||||
val x: Map<in String, String> = buildMap {
|
||||
put("", "")
|
||||
swap(<!TYPE_MISMATCH!>foo()<!>)
|
||||
} // `Map<CharSequence, String>` if we use builder inference, `Map<String, String>` if we don't
|
||||
|
||||
val y: MutableMap<String, CharSequence> = build7 {
|
||||
<!TYPE_MISMATCH, TYPE_MISMATCH, TYPE_MISMATCH!>id(run { this })<!>
|
||||
}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
package
|
||||
|
||||
@kotlin.UseExperimental(markerClass = {kotlin.experimental.ExperimentalTypeInference::class}) public fun </*0*/ K : V, /*1*/ V : kotlin.CharSequence> build7(/*0*/ @kotlin.BuilderInference builderAction: kotlin.collections.MutableMap<K, V>.() -> kotlin.collections.MutableMap<kotlin.String, V>): kotlin.collections.MutableMap<kotlin.String, V>
|
||||
@kotlin.OptIn(markerClass = {kotlin.experimental.ExperimentalTypeInference::class}) public fun </*0*/ K, /*1*/ V> buildMap(/*0*/ @kotlin.BuilderInference builderAction: kotlin.collections.MutableMap<K, V>.() -> kotlin.Unit): kotlin.collections.Map<K, V>
|
||||
public fun foo(): kotlin.collections.MutableMap<kotlin.CharSequence, *>
|
||||
public fun </*0*/ K> id(/*0*/ x: K): K
|
||||
@kotlin.OptIn(markerClass = {kotlin.ExperimentalStdlibApi::class}) public fun main(): kotlin.Unit
|
||||
public fun </*0*/ E> kotlin.collections.MutableMap<E, *>.swap(/*0*/ x: kotlin.collections.MutableMap<E, *>): kotlin.Unit
|
||||
-15
@@ -1,15 +0,0 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER -EXPERIMENTAL_IS_NOT_ENABLED
|
||||
// WITH_RUNTIME
|
||||
|
||||
import kotlin.experimental.ExperimentalTypeInference
|
||||
|
||||
@OptIn(ExperimentalTypeInference::class)
|
||||
fun <T> foo(x: T, @BuilderInference builder: T.() -> Unit): Unit = TODO()
|
||||
|
||||
class Bar<T>
|
||||
|
||||
fun test() {
|
||||
foo(1) {
|
||||
<!UNRESOLVED_REFERENCE!>dsgfsdg<!>
|
||||
}
|
||||
}
|
||||
+2
-1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER -EXPERIMENTAL_IS_NOT_ENABLED
|
||||
// WITH_RUNTIME
|
||||
|
||||
@@ -10,6 +11,6 @@ class Bar<T>
|
||||
|
||||
fun test() {
|
||||
foo(1) {
|
||||
<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE, DEBUG_INFO_UNRESOLVED_WITH_TARGET, UNRESOLVED_REFERENCE!>dsgfsdg<!>
|
||||
<!UNRESOLVED_REFERENCE!>dsgfsdg<!>
|
||||
}
|
||||
}
|
||||
|
||||
compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferences.kt
Vendored
+47
-47
@@ -87,57 +87,57 @@ fun poll06(): Flow<String> {
|
||||
|
||||
fun poll1(flag: Boolean): Flow<String> {
|
||||
return flow {
|
||||
val inv = if (flag) { ::bar2 } else { ::foo2 }
|
||||
inv()
|
||||
val inv = if (flag) { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>bar2<!><!> } else { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>foo2<!><!> }
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv<!>()
|
||||
}
|
||||
}
|
||||
|
||||
fun poll11(flag: Boolean): Flow<String> {
|
||||
return flow {
|
||||
val inv = if (flag) { ::bar2 } else { ::foo2 }
|
||||
inv()
|
||||
val inv = if (flag) { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>bar2<!><!> } else { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>foo2<!><!> }
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv<!>()
|
||||
}
|
||||
}
|
||||
|
||||
fun poll12(flag: Boolean): Flow<String> {
|
||||
return flow {
|
||||
val inv = if (flag) { ::bar3 } else { ::foo3 }
|
||||
inv()
|
||||
val inv = if (flag) { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>bar3<!><!> } else { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>foo3<!><!> }
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv<!>()
|
||||
}
|
||||
}
|
||||
|
||||
fun poll13(flag: Boolean): Flow<String> {
|
||||
return flow {
|
||||
val inv = if (flag) { ::bar2 } else { ::foo3 }
|
||||
inv()
|
||||
val inv = if (flag) { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>bar2<!><!> } else { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>foo3<!><!> }
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv<!>()
|
||||
}
|
||||
}
|
||||
|
||||
fun poll14(flag: Boolean): Flow<String> {
|
||||
return flow {
|
||||
val inv = if (flag) { ::bar4 } else { ::foo4 }
|
||||
inv()
|
||||
val inv = if (flag) { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>bar4<!><!> } else { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>foo4<!><!> }
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv<!>()
|
||||
}
|
||||
}
|
||||
|
||||
fun poll15(flag: Boolean): Flow<String> {
|
||||
return flow {
|
||||
val inv = if (flag) { ::bar5 } else { ::foo5 }
|
||||
inv()
|
||||
val inv = if (flag) { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>bar5<!><!> } else { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>foo5<!><!> }
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv<!>()
|
||||
}
|
||||
}
|
||||
|
||||
fun poll16(flag: Boolean): Flow<String> {
|
||||
return flow {
|
||||
val inv = if (flag) { ::Foo6 } else { ::Foo6 }
|
||||
inv()
|
||||
val inv = if (flag) { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>Foo6<!><!> } else { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>Foo6<!><!> }
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv<!>()
|
||||
}
|
||||
}
|
||||
|
||||
fun poll17(flag: Boolean): Flow<String> {
|
||||
return flow {
|
||||
val inv = if (flag) { foo7() } else { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::Foo7<!> }
|
||||
<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>inv<!>
|
||||
val inv = if (flag) { foo7() } else { ::<!DEBUG_INFO_MISSING_UNRESOLVED!>Foo7<!> }
|
||||
inv
|
||||
}
|
||||
}
|
||||
|
||||
@@ -241,99 +241,99 @@ fun poll36(flag: Boolean): Flow<String> {
|
||||
|
||||
fun poll4(): Flow<String> {
|
||||
return flow {
|
||||
val inv = try { ::bar } finally { ::foo }
|
||||
inv()
|
||||
val inv = try { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>bar<!><!> } finally { ::<!DEBUG_INFO_MISSING_UNRESOLVED!>foo<!> }
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv<!>()
|
||||
}
|
||||
}
|
||||
|
||||
fun poll41(): Flow<String> {
|
||||
return flow {
|
||||
val inv = try { ::bar2 } finally { ::foo2 }
|
||||
inv()
|
||||
val inv = try { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>bar2<!><!> } finally { ::<!DEBUG_INFO_MISSING_UNRESOLVED!>foo2<!> }
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv<!>()
|
||||
}
|
||||
}
|
||||
|
||||
fun poll42(): Flow<String> {
|
||||
return flow {
|
||||
val inv = try { ::bar3 } finally { ::foo3 }
|
||||
inv()
|
||||
val inv = try { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>bar3<!><!> } finally { ::<!DEBUG_INFO_MISSING_UNRESOLVED!>foo3<!> }
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv<!>()
|
||||
}
|
||||
}
|
||||
|
||||
fun poll43(): Flow<String> {
|
||||
return flow {
|
||||
val inv = try { ::bar4 } finally { ::foo4 }
|
||||
inv()
|
||||
val inv = try { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>bar4<!><!> } finally { ::<!DEBUG_INFO_MISSING_UNRESOLVED!>foo4<!> }
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv<!>()
|
||||
}
|
||||
}
|
||||
|
||||
fun poll44(): Flow<String> {
|
||||
return flow {
|
||||
val inv = try { ::bar5 } finally { ::foo5 }
|
||||
inv()
|
||||
val inv = try { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>bar5<!><!> } finally { ::<!DEBUG_INFO_MISSING_UNRESOLVED!>foo5<!> }
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv<!>()
|
||||
}
|
||||
}
|
||||
|
||||
fun poll45(): Flow<String> {
|
||||
return flow {
|
||||
val inv = try { ::Foo6 } finally { ::Foo6 }
|
||||
inv()
|
||||
val inv = try { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>Foo6<!><!> } finally { ::<!DEBUG_INFO_MISSING_UNRESOLVED!>Foo6<!> }
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv<!>()
|
||||
}
|
||||
}
|
||||
|
||||
fun poll46(): Flow<String> {
|
||||
return flow {
|
||||
val inv = try { foo7() } finally { ::<!TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>Foo7<!> }
|
||||
val inv = try { foo7() } finally { ::<!DEBUG_INFO_MISSING_UNRESOLVED!>Foo7<!> }
|
||||
inv
|
||||
}
|
||||
}
|
||||
|
||||
fun poll5(): Flow<String> {
|
||||
return flow {
|
||||
val inv = try { ::bar } catch (e: Exception) { ::foo } finally { ::foo }
|
||||
inv()
|
||||
val inv = try { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>bar<!><!> } catch (e: Exception) { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>foo<!><!> } finally { ::<!DEBUG_INFO_MISSING_UNRESOLVED!>foo<!> }
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv<!>()
|
||||
}
|
||||
}
|
||||
|
||||
fun poll51(): Flow<String> {
|
||||
return flow {
|
||||
val inv = try { ::bar2 } catch (e: Exception) { ::foo2 } finally { ::foo2 }
|
||||
inv()
|
||||
val inv = try { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>bar2<!><!> } catch (e: Exception) { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>foo2<!><!> } finally { ::<!DEBUG_INFO_MISSING_UNRESOLVED!>foo2<!> }
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv<!>()
|
||||
}
|
||||
}
|
||||
|
||||
fun poll52(): Flow<String> {
|
||||
return flow {
|
||||
val inv = try { ::bar3 } catch (e: Exception) { ::foo3 } finally { ::foo3 }
|
||||
inv()
|
||||
val inv = try { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>bar3<!><!> } catch (e: Exception) { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>foo3<!><!> } finally { ::<!DEBUG_INFO_MISSING_UNRESOLVED!>foo3<!> }
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv<!>()
|
||||
}
|
||||
}
|
||||
|
||||
fun poll53(): Flow<String> {
|
||||
return flow {
|
||||
val inv = try { ::bar4 } catch (e: Exception) { ::foo4 } finally { ::foo4 }
|
||||
inv()
|
||||
val inv = try { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>bar4<!><!> } catch (e: Exception) { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>foo4<!><!> } finally { ::<!DEBUG_INFO_MISSING_UNRESOLVED!>foo4<!> }
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv<!>()
|
||||
}
|
||||
}
|
||||
|
||||
fun poll54(): Flow<String> {
|
||||
return flow {
|
||||
val inv = try { ::bar5 } catch (e: Exception) { ::foo5 } finally { ::foo5 }
|
||||
inv()
|
||||
val inv = try { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>bar5<!><!> } catch (e: Exception) { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>foo5<!><!> } finally { ::<!DEBUG_INFO_MISSING_UNRESOLVED!>foo5<!> }
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv<!>()
|
||||
}
|
||||
}
|
||||
|
||||
fun poll55(): Flow<String> {
|
||||
return flow {
|
||||
val inv = try { ::Foo6 } catch (e: Exception) { ::Foo6 } finally { ::Foo6 }
|
||||
inv()
|
||||
val inv = try { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>Foo6<!><!> } catch (e: Exception) { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>Foo6<!><!> } finally { ::<!DEBUG_INFO_MISSING_UNRESOLVED!>Foo6<!> }
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv<!>()
|
||||
}
|
||||
}
|
||||
|
||||
fun poll56(): Flow<String> {
|
||||
return flow {
|
||||
val inv = try { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::Foo7<!> } catch (e: Exception) { foo7() } finally { foo7() }
|
||||
<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>inv<!>
|
||||
val inv = try { ::<!DEBUG_INFO_MISSING_UNRESOLVED!>Foo7<!> } catch (e: Exception) { foo7() } finally { foo7() }
|
||||
inv
|
||||
}
|
||||
}
|
||||
|
||||
@@ -430,7 +430,7 @@ fun poll75(): Flow<String> {
|
||||
|
||||
fun poll76(): Flow<String> {
|
||||
return flow {
|
||||
val inv = <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>Foo7<!><!><!NOT_NULL_ASSERTION_ON_CALLABLE_REFERENCE!>!!<!>
|
||||
val inv = <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::Foo7<!><!NOT_NULL_ASSERTION_ON_CALLABLE_REFERENCE!>!!<!>
|
||||
<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>inv<!>
|
||||
}
|
||||
}
|
||||
@@ -445,7 +445,7 @@ fun poll8(): Flow<String> {
|
||||
fun poll81(): Flow<String> {
|
||||
return flow {
|
||||
val inv = ::bar2 <!TYPE_INFERENCE_ONLY_INPUT_TYPES_ERROR!>in<!> setOf(::foo2)
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv()<!>
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv<!>()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -479,14 +479,14 @@ fun poll85(): Flow<String> {
|
||||
|
||||
fun poll86(): Flow<String> {
|
||||
return flow {
|
||||
val inv = ::<!TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>Foo7<!> in <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>setOf<!>(<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::Foo7<!>)
|
||||
val inv = ::Foo7 in <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>setOf<!>(<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::Foo7<!>)
|
||||
<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>inv<!>
|
||||
}
|
||||
}
|
||||
|
||||
fun poll87(): Flow<String> {
|
||||
return flow {
|
||||
val inv = <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>Foo7<!><!> <!TYPE_INFERENCE_ONLY_INPUT_TYPES_ERROR!>in<!> setOf(foo7())
|
||||
val inv = <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::Foo7<!> <!TYPE_INFERENCE_ONLY_INPUT_TYPES_ERROR!>in<!> setOf(foo7())
|
||||
<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>inv<!>
|
||||
}
|
||||
}
|
||||
|
||||
+43
-43
@@ -36,154 +36,154 @@ class Flow<out R>(private val block: suspend FlowCollector<R>.() -> Unit)
|
||||
|
||||
fun poll1(flag: Boolean): Flow<String> {
|
||||
return flow {
|
||||
val inv = if (flag) { ::bar2 } else { ::foo2 }
|
||||
inv()
|
||||
val inv = if (flag) { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>bar2<!><!> } else { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>foo2<!><!> }
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv<!>()
|
||||
}
|
||||
}
|
||||
|
||||
fun poll11(flag: Boolean): Flow<String> {
|
||||
return flow {
|
||||
val inv = if (flag) { ::bar2 } else { ::foo2 }
|
||||
inv()
|
||||
val inv = if (flag) { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>bar2<!><!> } else { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>foo2<!><!> }
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv<!>()
|
||||
}
|
||||
}
|
||||
|
||||
fun poll12(flag: Boolean): Flow<String> {
|
||||
return flow {
|
||||
val inv = if (flag) { ::bar3 } else { ::foo3 }
|
||||
inv()
|
||||
val inv = if (flag) { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>bar3<!><!> } else { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>foo3<!><!> }
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv<!>()
|
||||
}
|
||||
}
|
||||
|
||||
fun poll13(flag: Boolean): Flow<String> {
|
||||
return flow {
|
||||
val inv = if (flag) { ::bar2 } else { ::foo3 }
|
||||
inv()
|
||||
val inv = if (flag) { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>bar2<!><!> } else { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>foo3<!><!> }
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv<!>()
|
||||
}
|
||||
}
|
||||
|
||||
fun poll14(flag: Boolean): Flow<String> {
|
||||
return flow {
|
||||
val inv = if (flag) { ::bar4 } else { ::foo4 }
|
||||
inv()
|
||||
val inv = if (flag) { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>bar4<!><!> } else { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>foo4<!><!> }
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv<!>()
|
||||
}
|
||||
}
|
||||
|
||||
fun poll15(flag: Boolean): Flow<String> {
|
||||
return flow {
|
||||
val inv = if (flag) { ::bar5 } else { ::foo5 }
|
||||
inv()
|
||||
val inv = if (flag) { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>bar5<!><!> } else { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>foo5<!><!> }
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv<!>()
|
||||
}
|
||||
}
|
||||
|
||||
fun poll16(flag: Boolean): Flow<String> {
|
||||
return flow {
|
||||
val inv = if (flag) { ::Foo6 } else { ::Foo6 }
|
||||
inv()
|
||||
val inv = if (flag) { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>Foo6<!><!> } else { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>Foo6<!><!> }
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv<!>()
|
||||
}
|
||||
}
|
||||
|
||||
fun poll17(flag: Boolean): Flow<String> {
|
||||
return flow {
|
||||
val inv = if (flag) { foo7() } else { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::Foo7<!> }
|
||||
<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>inv<!>
|
||||
val inv = if (flag) { foo7() } else { ::<!DEBUG_INFO_MISSING_UNRESOLVED!>Foo7<!> }
|
||||
inv
|
||||
}
|
||||
}
|
||||
|
||||
fun poll4(): Flow<String> {
|
||||
return flow {
|
||||
val inv = try { ::bar } finally { ::foo }
|
||||
inv()
|
||||
val inv = try { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>bar<!><!> } finally { ::<!DEBUG_INFO_MISSING_UNRESOLVED!>foo<!> }
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv<!>()
|
||||
}
|
||||
}
|
||||
|
||||
fun poll41(): Flow<String> {
|
||||
return flow {
|
||||
val inv = try { ::bar2 } finally { ::foo2 }
|
||||
inv()
|
||||
val inv = try { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>bar2<!><!> } finally { ::<!DEBUG_INFO_MISSING_UNRESOLVED!>foo2<!> }
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv<!>()
|
||||
}
|
||||
}
|
||||
|
||||
fun poll42(): Flow<String> {
|
||||
return flow {
|
||||
val inv = try { ::bar3 } finally { ::foo3 }
|
||||
inv()
|
||||
val inv = try { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>bar3<!><!> } finally { ::<!DEBUG_INFO_MISSING_UNRESOLVED!>foo3<!> }
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv<!>()
|
||||
}
|
||||
}
|
||||
|
||||
fun poll43(): Flow<String> {
|
||||
return flow {
|
||||
val inv = try { ::bar4 } finally { ::foo4 }
|
||||
inv()
|
||||
val inv = try { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>bar4<!><!> } finally { ::<!DEBUG_INFO_MISSING_UNRESOLVED!>foo4<!> }
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv<!>()
|
||||
}
|
||||
}
|
||||
|
||||
fun poll44(): Flow<String> {
|
||||
return flow {
|
||||
val inv = try { ::bar5 } finally { ::foo5 }
|
||||
inv()
|
||||
val inv = try { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>bar5<!><!> } finally { ::<!DEBUG_INFO_MISSING_UNRESOLVED!>foo5<!> }
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv<!>()
|
||||
}
|
||||
}
|
||||
|
||||
fun poll45(): Flow<String> {
|
||||
return flow {
|
||||
val inv = try { ::Foo6 } finally { ::Foo6 }
|
||||
inv()
|
||||
val inv = try { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>Foo6<!><!> } finally { ::<!DEBUG_INFO_MISSING_UNRESOLVED!>Foo6<!> }
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv<!>()
|
||||
}
|
||||
}
|
||||
|
||||
fun poll46(): Flow<String> {
|
||||
return flow {
|
||||
val inv = try { foo7() } finally { ::<!TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>Foo7<!> }
|
||||
val inv = try { foo7() } finally { ::<!DEBUG_INFO_MISSING_UNRESOLVED!>Foo7<!> }
|
||||
inv
|
||||
}
|
||||
}
|
||||
|
||||
fun poll5(): Flow<String> {
|
||||
return flow {
|
||||
val inv = try { ::bar } catch (e: Exception) { ::foo } finally { ::foo }
|
||||
inv()
|
||||
val inv = try { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>bar<!><!> } catch (e: Exception) { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>foo<!><!> } finally { ::<!DEBUG_INFO_MISSING_UNRESOLVED!>foo<!> }
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv<!>()
|
||||
}
|
||||
}
|
||||
|
||||
fun poll51(): Flow<String> {
|
||||
return flow {
|
||||
val inv = try { ::bar2 } catch (e: Exception) { ::foo2 } finally { ::foo2 }
|
||||
inv()
|
||||
val inv = try { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>bar2<!><!> } catch (e: Exception) { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>foo2<!><!> } finally { ::<!DEBUG_INFO_MISSING_UNRESOLVED!>foo2<!> }
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv<!>()
|
||||
}
|
||||
}
|
||||
|
||||
fun poll52(): Flow<String> {
|
||||
return flow {
|
||||
val inv = try { ::bar3 } catch (e: Exception) { ::foo3 } finally { ::foo3 }
|
||||
inv()
|
||||
val inv = try { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>bar3<!><!> } catch (e: Exception) { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>foo3<!><!> } finally { ::<!DEBUG_INFO_MISSING_UNRESOLVED!>foo3<!> }
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv<!>()
|
||||
}
|
||||
}
|
||||
|
||||
fun poll53(): Flow<String> {
|
||||
return flow {
|
||||
val inv = try { ::bar4 } catch (e: Exception) { ::foo4 } finally { ::foo4 }
|
||||
inv()
|
||||
val inv = try { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>bar4<!><!> } catch (e: Exception) { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>foo4<!><!> } finally { ::<!DEBUG_INFO_MISSING_UNRESOLVED!>foo4<!> }
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv<!>()
|
||||
}
|
||||
}
|
||||
|
||||
fun poll54(): Flow<String> {
|
||||
return flow {
|
||||
val inv = try { ::bar5 } catch (e: Exception) { ::foo5 } finally { ::foo5 }
|
||||
inv()
|
||||
val inv = try { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>bar5<!><!> } catch (e: Exception) { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>foo5<!><!> } finally { ::<!DEBUG_INFO_MISSING_UNRESOLVED!>foo5<!> }
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv<!>()
|
||||
}
|
||||
}
|
||||
|
||||
fun poll55(): Flow<String> {
|
||||
return flow {
|
||||
val inv = try { ::Foo6 } catch (e: Exception) { ::Foo6 } finally { ::Foo6 }
|
||||
inv()
|
||||
val inv = try { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>Foo6<!><!> } catch (e: Exception) { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>Foo6<!><!> } finally { ::<!DEBUG_INFO_MISSING_UNRESOLVED!>Foo6<!> }
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv<!>()
|
||||
}
|
||||
}
|
||||
|
||||
fun poll56(): Flow<String> {
|
||||
return flow {
|
||||
val inv = try { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::Foo7<!> } catch (e: Exception) { foo7() } finally { foo7() }
|
||||
<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>inv<!>
|
||||
val inv = try { ::<!DEBUG_INFO_MISSING_UNRESOLVED!>Foo7<!> } catch (e: Exception) { foo7() } finally { foo7() }
|
||||
inv
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -58,7 +58,7 @@ fun poll75(): Flow<String> {
|
||||
fun poll81(): Flow<String> {
|
||||
return flow {
|
||||
val inv = ::bar2 <!TYPE_INFERENCE_ONLY_INPUT_TYPES_ERROR!>in<!> setOf(::foo2)
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv()<!>
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv<!>()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -79,7 +79,7 @@ fun poll75(): Flow<String> {
|
||||
|
||||
fun poll76(): Flow<String> {
|
||||
return flow {
|
||||
val inv = <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>Foo7<!><!><!NOT_NULL_ASSERTION_ON_CALLABLE_REFERENCE!>!!<!>
|
||||
val inv = <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::Foo7<!><!NOT_NULL_ASSERTION_ON_CALLABLE_REFERENCE!>!!<!>
|
||||
<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>inv<!>
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -80,7 +80,7 @@ fun poll75(): Flow<String> {
|
||||
|
||||
fun poll76(): Flow<String> {
|
||||
return flow {
|
||||
val inv = <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>Foo7<!><!><!NOT_NULL_ASSERTION_ON_CALLABLE_REFERENCE!>!!<!>
|
||||
val inv = <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::Foo7<!><!NOT_NULL_ASSERTION_ON_CALLABLE_REFERENCE!>!!<!>
|
||||
<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>inv<!>
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ class Flow<out R>(private val block: suspend FlowCollector<R>.() -> Unit)
|
||||
fun poll81(): Flow<String> {
|
||||
return flow {
|
||||
val inv = ::bar2 <!TYPE_INFERENCE_ONLY_INPUT_TYPES_ERROR!>in<!> setOf(::foo2)
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv()<!>
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv<!>()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
@@ -2,6 +2,7 @@
|
||||
// WITH_RUNTIME
|
||||
// SKIP_TXT
|
||||
// !DIAGNOSTICS: -CAST_NEVER_SUCCEEDS -UNCHECKED_CAST -UNUSED_PARAMETER -UNUSED_VARIABLE -EXPERIMENTAL_API_USAGE_ERROR -UNUSED_EXPRESSION
|
||||
// KT-47797
|
||||
|
||||
import kotlin.experimental.ExperimentalTypeInference
|
||||
|
||||
|
||||
+48
-47
@@ -2,6 +2,7 @@
|
||||
// WITH_RUNTIME
|
||||
// SKIP_TXT
|
||||
// !DIAGNOSTICS: -CAST_NEVER_SUCCEEDS -UNCHECKED_CAST -UNUSED_PARAMETER -UNUSED_VARIABLE -EXPERIMENTAL_API_USAGE_ERROR -UNUSED_EXPRESSION
|
||||
// KT-47797
|
||||
|
||||
import kotlin.experimental.ExperimentalTypeInference
|
||||
|
||||
@@ -88,57 +89,57 @@ fun poll06(): Flow<String> {
|
||||
|
||||
fun poll1(flag: Boolean): Flow<String> {
|
||||
return flow {
|
||||
val inv = if (flag) { ::bar2 } else { ::foo2 }
|
||||
inv()
|
||||
val inv = if (flag) { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>bar2<!><!> } else { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>foo2<!><!> }
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv<!>()
|
||||
}
|
||||
}
|
||||
|
||||
fun poll11(flag: Boolean): Flow<String> {
|
||||
return flow {
|
||||
val inv = if (flag) { ::bar2 } else { ::foo2 }
|
||||
inv()
|
||||
val inv = if (flag) { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>bar2<!><!> } else { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>foo2<!><!> }
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv<!>()
|
||||
}
|
||||
}
|
||||
|
||||
fun poll12(flag: Boolean): Flow<String> {
|
||||
return flow {
|
||||
val inv = if (flag) { ::bar3 } else { ::foo3 }
|
||||
inv()
|
||||
val inv = if (flag) { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>bar3<!><!> } else { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>foo3<!><!> }
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv<!>()
|
||||
}
|
||||
}
|
||||
|
||||
fun poll13(flag: Boolean): Flow<String> {
|
||||
return flow {
|
||||
val inv = if (flag) { ::bar2 } else { ::foo3 }
|
||||
inv()
|
||||
val inv = if (flag) { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>bar2<!><!> } else { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>foo3<!><!> }
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv<!>()
|
||||
}
|
||||
}
|
||||
|
||||
fun poll14(flag: Boolean): Flow<String> {
|
||||
return flow {
|
||||
val inv = if (flag) { ::bar4 } else { ::foo4 }
|
||||
inv()
|
||||
val inv = if (flag) { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>bar4<!><!> } else { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>foo4<!><!> }
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv<!>()
|
||||
}
|
||||
}
|
||||
|
||||
fun poll15(flag: Boolean): Flow<String> {
|
||||
return flow {
|
||||
val inv = if (flag) { ::bar5 } else { ::foo5 }
|
||||
inv()
|
||||
val inv = if (flag) { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>bar5<!><!> } else { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>foo5<!><!> }
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv<!>()
|
||||
}
|
||||
}
|
||||
|
||||
fun poll16(flag: Boolean): Flow<String> {
|
||||
return flow {
|
||||
val inv = if (flag) { ::Foo6 } else { ::Foo6 }
|
||||
inv()
|
||||
val inv = if (flag) { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>Foo6<!><!> } else { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>Foo6<!><!> }
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv<!>()
|
||||
}
|
||||
}
|
||||
|
||||
fun poll17(flag: Boolean): Flow<String> {
|
||||
return flow {
|
||||
val inv = if (flag) { foo7() } else { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::Foo7<!> }
|
||||
<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>inv<!>
|
||||
val inv = if (flag) { foo7() } else { ::<!DEBUG_INFO_MISSING_UNRESOLVED!>Foo7<!> }
|
||||
inv
|
||||
}
|
||||
}
|
||||
|
||||
@@ -242,99 +243,99 @@ fun poll36(flag: Boolean): Flow<String> {
|
||||
|
||||
fun poll4(): Flow<String> {
|
||||
return flow {
|
||||
val inv = try { ::bar } finally { ::foo }
|
||||
inv()
|
||||
val inv = try { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>bar<!><!> } finally { ::<!DEBUG_INFO_MISSING_UNRESOLVED!>foo<!> }
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv<!>()
|
||||
}
|
||||
}
|
||||
|
||||
fun poll41(): Flow<String> {
|
||||
return flow {
|
||||
val inv = try { ::bar2 } finally { ::foo2 }
|
||||
inv()
|
||||
val inv = try { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>bar2<!><!> } finally { ::<!DEBUG_INFO_MISSING_UNRESOLVED!>foo2<!> }
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv<!>()
|
||||
}
|
||||
}
|
||||
|
||||
fun poll42(): Flow<String> {
|
||||
return flow {
|
||||
val inv = try { ::bar3 } finally { ::foo3 }
|
||||
inv()
|
||||
val inv = try { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>bar3<!><!> } finally { ::<!DEBUG_INFO_MISSING_UNRESOLVED!>foo3<!> }
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv<!>()
|
||||
}
|
||||
}
|
||||
|
||||
fun poll43(): Flow<String> {
|
||||
return flow {
|
||||
val inv = try { ::bar4 } finally { ::foo4 }
|
||||
inv()
|
||||
val inv = try { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>bar4<!><!> } finally { ::<!DEBUG_INFO_MISSING_UNRESOLVED!>foo4<!> }
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv<!>()
|
||||
}
|
||||
}
|
||||
|
||||
fun poll44(): Flow<String> {
|
||||
return flow {
|
||||
val inv = try { ::bar5 } finally { ::foo5 }
|
||||
inv()
|
||||
val inv = try { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>bar5<!><!> } finally { ::<!DEBUG_INFO_MISSING_UNRESOLVED!>foo5<!> }
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv<!>()
|
||||
}
|
||||
}
|
||||
|
||||
fun poll45(): Flow<String> {
|
||||
return flow {
|
||||
val inv = try { ::Foo6 } finally { ::Foo6 }
|
||||
inv()
|
||||
val inv = try { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>Foo6<!><!> } finally { ::<!DEBUG_INFO_MISSING_UNRESOLVED!>Foo6<!> }
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv<!>()
|
||||
}
|
||||
}
|
||||
|
||||
fun poll46(): Flow<String> {
|
||||
return flow {
|
||||
val inv = try { foo7() } finally { ::<!TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>Foo7<!> }
|
||||
val inv = try { foo7() } finally { ::<!DEBUG_INFO_MISSING_UNRESOLVED!>Foo7<!> }
|
||||
inv
|
||||
}
|
||||
}
|
||||
|
||||
fun poll5(): Flow<String> {
|
||||
return flow {
|
||||
val inv = try { ::bar } catch (e: Exception) { ::foo } finally { ::foo }
|
||||
inv()
|
||||
val inv = try { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>bar<!><!> } catch (e: Exception) { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>foo<!><!> } finally { ::<!DEBUG_INFO_MISSING_UNRESOLVED!>foo<!> }
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv<!>()
|
||||
}
|
||||
}
|
||||
|
||||
fun poll51(): Flow<String> {
|
||||
return flow {
|
||||
val inv = try { ::bar2 } catch (e: Exception) { ::foo2 } finally { ::foo2 }
|
||||
inv()
|
||||
val inv = try { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>bar2<!><!> } catch (e: Exception) { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>foo2<!><!> } finally { ::<!DEBUG_INFO_MISSING_UNRESOLVED!>foo2<!> }
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv<!>()
|
||||
}
|
||||
}
|
||||
|
||||
fun poll52(): Flow<String> {
|
||||
return flow {
|
||||
val inv = try { ::bar3 } catch (e: Exception) { ::foo3 } finally { ::foo3 }
|
||||
inv()
|
||||
val inv = try { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>bar3<!><!> } catch (e: Exception) { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>foo3<!><!> } finally { ::<!DEBUG_INFO_MISSING_UNRESOLVED!>foo3<!> }
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv<!>()
|
||||
}
|
||||
}
|
||||
|
||||
fun poll53(): Flow<String> {
|
||||
return flow {
|
||||
val inv = try { ::bar4 } catch (e: Exception) { ::foo4 } finally { ::foo4 }
|
||||
inv()
|
||||
val inv = try { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>bar4<!><!> } catch (e: Exception) { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>foo4<!><!> } finally { ::<!DEBUG_INFO_MISSING_UNRESOLVED!>foo4<!> }
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv<!>()
|
||||
}
|
||||
}
|
||||
|
||||
fun poll54(): Flow<String> {
|
||||
return flow {
|
||||
val inv = try { ::bar5 } catch (e: Exception) { ::foo5 } finally { ::foo5 }
|
||||
inv()
|
||||
val inv = try { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>bar5<!><!> } catch (e: Exception) { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>foo5<!><!> } finally { ::<!DEBUG_INFO_MISSING_UNRESOLVED!>foo5<!> }
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv<!>()
|
||||
}
|
||||
}
|
||||
|
||||
fun poll55(): Flow<String> {
|
||||
return flow {
|
||||
val inv = try { ::Foo6 } catch (e: Exception) { ::Foo6 } finally { ::Foo6 }
|
||||
inv()
|
||||
val inv = try { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>Foo6<!><!> } catch (e: Exception) { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!DEBUG_INFO_MISSING_UNRESOLVED!>Foo6<!><!> } finally { ::<!DEBUG_INFO_MISSING_UNRESOLVED!>Foo6<!> }
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv<!>()
|
||||
}
|
||||
}
|
||||
|
||||
fun poll56(): Flow<String> {
|
||||
return flow {
|
||||
val inv = try { <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::Foo7<!> } catch (e: Exception) { foo7() } finally { foo7() }
|
||||
<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>inv<!>
|
||||
val inv = try { ::<!DEBUG_INFO_MISSING_UNRESOLVED!>Foo7<!> } catch (e: Exception) { foo7() } finally { foo7() }
|
||||
inv
|
||||
}
|
||||
}
|
||||
|
||||
@@ -431,7 +432,7 @@ fun poll75(): Flow<String> {
|
||||
|
||||
fun poll76(): Flow<String> {
|
||||
return flow {
|
||||
val inv = <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>Foo7<!><!><!NOT_NULL_ASSERTION_ON_CALLABLE_REFERENCE!>!!<!>
|
||||
val inv = <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::Foo7<!><!NOT_NULL_ASSERTION_ON_CALLABLE_REFERENCE!>!!<!>
|
||||
<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>inv<!>
|
||||
}
|
||||
}
|
||||
@@ -446,7 +447,7 @@ fun poll8(): Flow<String> {
|
||||
fun poll81(): Flow<String> {
|
||||
return flow {
|
||||
val inv = ::bar2 <!TYPE_INFERENCE_ONLY_INPUT_TYPES_ERROR!>in<!> setOf(::foo2)
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv()<!>
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv<!>()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -480,14 +481,14 @@ fun poll85(): Flow<String> {
|
||||
|
||||
fun poll86(): Flow<String> {
|
||||
return flow {
|
||||
val inv = ::<!TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>Foo7<!> in <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>setOf<!>(<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::Foo7<!>)
|
||||
val inv = ::Foo7 in <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>setOf<!>(<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::Foo7<!>)
|
||||
<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>inv<!>
|
||||
}
|
||||
}
|
||||
|
||||
fun poll87(): Flow<String> {
|
||||
return flow {
|
||||
val inv = <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::<!TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>Foo7<!><!> <!TYPE_INFERENCE_ONLY_INPUT_TYPES_ERROR!>in<!> setOf(foo7())
|
||||
val inv = <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::Foo7<!> <!TYPE_INFERENCE_ONLY_INPUT_TYPES_ERROR!>in<!> setOf(foo7())
|
||||
<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>inv<!>
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -148,7 +148,7 @@ fun poll73(): Flow<String> {
|
||||
fun poll8(): Flow<String> {
|
||||
return flow {
|
||||
val inv = {<!CONSTANT_EXPECTED_TYPE_MISMATCH, CONSTANT_EXPECTED_TYPE_MISMATCH!>1<!>} in setOf({1f})
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv()<!>
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv<!>()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -176,7 +176,7 @@ fun poll83(): Flow<String> {
|
||||
fun poll84(): Flow<String> {
|
||||
return flow {
|
||||
val inv = {{<!CONSTANT_EXPECTED_TYPE_MISMATCH, CONSTANT_EXPECTED_TYPE_MISMATCH!>1<!>}} in setOf({{1f}})
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv()<!>
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>inv<!>()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -52,11 +52,11 @@ fun test(a: String?) {
|
||||
}
|
||||
val ret4 = build4(1) {
|
||||
emit(1)
|
||||
get()?.equals("")
|
||||
get()<!UNNECESSARY_SAFE_CALL!>?.<!>equals("")
|
||||
val x = get()
|
||||
x?.equals("")
|
||||
x<!UNNECESSARY_SAFE_CALL!>?.<!>equals("")
|
||||
x <!USELESS_ELVIS!>?: 1<!>
|
||||
x!!
|
||||
x<!UNNECESSARY_NOT_NULL_ASSERTION!>!!<!>
|
||||
""
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+2
-2
@@ -18,6 +18,6 @@ val test1 = <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>generate<!> {
|
||||
yield(<!NO_COMPANION_OBJECT!>A<!>)
|
||||
}
|
||||
|
||||
val test2: Int = <!TYPE_MISMATCH!>generate {
|
||||
val test2: Int = generate {
|
||||
yield(<!TYPE_MISMATCH!>A()<!>)
|
||||
}<!>
|
||||
}
|
||||
|
||||
Generated
+6
@@ -13332,6 +13332,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/builderInference"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("changingResolveIfDontUseBuilderInference.kt")
|
||||
public void testChangingResolveIfDontUseBuilderInference() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/inference/builderInference/changingResolveIfDontUseBuilderInference.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt47744.kt")
|
||||
public void testKt47744() throws Exception {
|
||||
|
||||
+6
-12
@@ -17881,6 +17881,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
runTest("compiler/testData/codegen/box/inference/builderInference/capturedTypes.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("changingResolveIfDontUseBuilderInferenceDisabledFeature.kt")
|
||||
public void testChangingResolveIfDontUseBuilderInferenceDisabledFeature() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inference/builderInference/changingResolveIfDontUseBuilderInferenceDisabledFeature.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("commonSuperType.kt")
|
||||
public void testCommonSuperType() throws Exception {
|
||||
@@ -17995,18 +18001,6 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
runTest("compiler/testData/codegen/box/inference/builderInference/specialCallsWithCallableReferences.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("specialCallsWithCallableReferencesDontCareTypeInBlockExpression.kt")
|
||||
public void testSpecialCallsWithCallableReferencesDontCareTypeInBlockExpression() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inference/builderInference/specialCallsWithCallableReferencesDontCareTypeInBlockExpression.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("specialCallsWithCallableReferencesDontCareTypeInBlockExression.kt")
|
||||
public void testSpecialCallsWithCallableReferencesDontCareTypeInBlockExression() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inference/builderInference/specialCallsWithCallableReferencesDontCareTypeInBlockExression.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("specialCallsWithCallableReferencesDontRewriteAtSlice.kt")
|
||||
public void testSpecialCallsWithCallableReferencesDontRewriteAtSlice() throws Exception {
|
||||
|
||||
+6
-12
@@ -18019,6 +18019,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
runTest("compiler/testData/codegen/box/inference/builderInference/capturedTypes.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("changingResolveIfDontUseBuilderInferenceDisabledFeature.kt")
|
||||
public void testChangingResolveIfDontUseBuilderInferenceDisabledFeature() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inference/builderInference/changingResolveIfDontUseBuilderInferenceDisabledFeature.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("commonSuperType.kt")
|
||||
public void testCommonSuperType() throws Exception {
|
||||
@@ -18139,18 +18145,6 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
runTest("compiler/testData/codegen/box/inference/builderInference/specialCallsWithCallableReferences.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("specialCallsWithCallableReferencesDontCareTypeInBlockExpression.kt")
|
||||
public void testSpecialCallsWithCallableReferencesDontCareTypeInBlockExpression() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inference/builderInference/specialCallsWithCallableReferencesDontCareTypeInBlockExpression.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("specialCallsWithCallableReferencesDontCareTypeInBlockExression.kt")
|
||||
public void testSpecialCallsWithCallableReferencesDontCareTypeInBlockExression() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inference/builderInference/specialCallsWithCallableReferencesDontCareTypeInBlockExression.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("specialCallsWithCallableReferencesDontRewriteAtSlice.kt")
|
||||
public void testSpecialCallsWithCallableReferencesDontRewriteAtSlice() throws Exception {
|
||||
|
||||
+5
-10
@@ -14787,11 +14787,6 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class BuilderInference extends AbstractLightAnalysisModeTest {
|
||||
@TestMetadata("specialCallsWithCallableReferencesDontCareTypeInBlockExression.kt")
|
||||
public void ignoreSpecialCallsWithCallableReferencesDontCareTypeInBlockExression() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inference/builderInference/specialCallsWithCallableReferencesDontCareTypeInBlockExression.kt");
|
||||
}
|
||||
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
|
||||
}
|
||||
@@ -14820,6 +14815,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
runTest("compiler/testData/codegen/box/inference/builderInference/capturedTypes.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("changingResolveIfDontUseBuilderInferenceDisabledFeature.kt")
|
||||
public void testChangingResolveIfDontUseBuilderInferenceDisabledFeature() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inference/builderInference/changingResolveIfDontUseBuilderInferenceDisabledFeature.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("commonSuperType.kt")
|
||||
public void testCommonSuperType() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inference/builderInference/commonSuperType.kt");
|
||||
@@ -14915,11 +14915,6 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
runTest("compiler/testData/codegen/box/inference/builderInference/specialCallsWithCallableReferences.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("specialCallsWithCallableReferencesDontCareTypeInBlockExpression.kt")
|
||||
public void testSpecialCallsWithCallableReferencesDontCareTypeInBlockExpression() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inference/builderInference/specialCallsWithCallableReferencesDontCareTypeInBlockExpression.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("specialCallsWithCallableReferencesDontRewriteAtSlice.kt")
|
||||
public void testSpecialCallsWithCallableReferencesDontRewriteAtSlice() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inference/builderInference/specialCallsWithCallableReferencesDontRewriteAtSlice.kt");
|
||||
|
||||
@@ -220,6 +220,7 @@ enum class LanguageFeature(
|
||||
OptInContagiousSignatures(KOTLIN_1_6, kind = BUG_FIX),
|
||||
RepeatableAnnotations(KOTLIN_1_6),
|
||||
RepeatableAnnotationContainerConstraints(KOTLIN_1_6, kind = BUG_FIX),
|
||||
UseBuilderInferenceOnlyIfNeeded(KOTLIN_1_6),
|
||||
|
||||
// 1.7
|
||||
|
||||
|
||||
+12
@@ -13326,6 +13326,12 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/builderInference"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("changingResolveIfDontUseBuilderInference.kt")
|
||||
public void testChangingResolveIfDontUseBuilderInference() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/inference/builderInference/changingResolveIfDontUseBuilderInference.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt47744.kt")
|
||||
public void testKt47744() throws Exception {
|
||||
@@ -13398,6 +13404,12 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag
|
||||
runTest("compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithLambdas.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("withoutAnnotationDisabledFeature.kt")
|
||||
public void testWithoutAnnotationDisabledFeature() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/inference/builderInference/withoutAnnotationDisabledFeature.kt");
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/diagnostics/tests/inference/builderInference/constraints")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java
Generated
+5
-10
@@ -12934,6 +12934,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes
|
||||
runTest("compiler/testData/codegen/box/inference/builderInference/capturedTypes.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("changingResolveIfDontUseBuilderInferenceDisabledFeature.kt")
|
||||
public void testChangingResolveIfDontUseBuilderInferenceDisabledFeature() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inference/builderInference/changingResolveIfDontUseBuilderInferenceDisabledFeature.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("constraintsBetweenTwoStubVariables.kt")
|
||||
public void testConstraintsBetweenTwoStubVariables() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inference/builderInference/constraintsBetweenTwoStubVariables.kt");
|
||||
@@ -12999,16 +13004,6 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes
|
||||
runTest("compiler/testData/codegen/box/inference/builderInference/specialCallsWithCallableReferences.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("specialCallsWithCallableReferencesDontCareTypeInBlockExpression.kt")
|
||||
public void testSpecialCallsWithCallableReferencesDontCareTypeInBlockExpression() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inference/builderInference/specialCallsWithCallableReferencesDontCareTypeInBlockExpression.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("specialCallsWithCallableReferencesDontCareTypeInBlockExression.kt")
|
||||
public void testSpecialCallsWithCallableReferencesDontCareTypeInBlockExression() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inference/builderInference/specialCallsWithCallableReferencesDontCareTypeInBlockExression.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("specialCallsWithCallableReferencesDontRewriteAtSlice.kt")
|
||||
public void testSpecialCallsWithCallableReferencesDontRewriteAtSlice() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inference/builderInference/specialCallsWithCallableReferencesDontRewriteAtSlice.kt");
|
||||
|
||||
Generated
+5
-10
@@ -12340,6 +12340,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/inference/builderInference/capturedTypes.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("changingResolveIfDontUseBuilderInferenceDisabledFeature.kt")
|
||||
public void testChangingResolveIfDontUseBuilderInferenceDisabledFeature() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inference/builderInference/changingResolveIfDontUseBuilderInferenceDisabledFeature.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("constraintsBetweenTwoStubVariables.kt")
|
||||
public void testConstraintsBetweenTwoStubVariables() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inference/builderInference/constraintsBetweenTwoStubVariables.kt");
|
||||
@@ -12405,16 +12410,6 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/inference/builderInference/specialCallsWithCallableReferences.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("specialCallsWithCallableReferencesDontCareTypeInBlockExpression.kt")
|
||||
public void testSpecialCallsWithCallableReferencesDontCareTypeInBlockExpression() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inference/builderInference/specialCallsWithCallableReferencesDontCareTypeInBlockExpression.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("specialCallsWithCallableReferencesDontCareTypeInBlockExression.kt")
|
||||
public void testSpecialCallsWithCallableReferencesDontCareTypeInBlockExression() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inference/builderInference/specialCallsWithCallableReferencesDontCareTypeInBlockExression.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("specialCallsWithCallableReferencesDontRewriteAtSlice.kt")
|
||||
public void testSpecialCallsWithCallableReferencesDontRewriteAtSlice() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inference/builderInference/specialCallsWithCallableReferencesDontRewriteAtSlice.kt");
|
||||
|
||||
Generated
+5
-10
@@ -12405,6 +12405,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/inference/builderInference/capturedTypes.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("changingResolveIfDontUseBuilderInferenceDisabledFeature.kt")
|
||||
public void testChangingResolveIfDontUseBuilderInferenceDisabledFeature() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inference/builderInference/changingResolveIfDontUseBuilderInferenceDisabledFeature.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("constraintsBetweenTwoStubVariables.kt")
|
||||
public void testConstraintsBetweenTwoStubVariables() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inference/builderInference/constraintsBetweenTwoStubVariables.kt");
|
||||
@@ -12470,16 +12475,6 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/inference/builderInference/specialCallsWithCallableReferences.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("specialCallsWithCallableReferencesDontCareTypeInBlockExpression.kt")
|
||||
public void testSpecialCallsWithCallableReferencesDontCareTypeInBlockExpression() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inference/builderInference/specialCallsWithCallableReferencesDontCareTypeInBlockExpression.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("specialCallsWithCallableReferencesDontCareTypeInBlockExression.kt")
|
||||
public void testSpecialCallsWithCallableReferencesDontCareTypeInBlockExression() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inference/builderInference/specialCallsWithCallableReferencesDontCareTypeInBlockExression.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("specialCallsWithCallableReferencesDontRewriteAtSlice.kt")
|
||||
public void testSpecialCallsWithCallableReferencesDontRewriteAtSlice() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inference/builderInference/specialCallsWithCallableReferencesDontRewriteAtSlice.kt");
|
||||
|
||||
Reference in New Issue
Block a user