[NI] Don't always complete builder inference lambda in FULL mode

#KT-41164 Fixed
This commit is contained in:
Dmitriy Novozhilov
2020-08-20 15:04:52 +03:00
parent 6a15e0410f
commit e98cbf81cf
21 changed files with 181 additions and 10 deletions
@@ -2096,6 +2096,11 @@ public class FirOldFrontendDiagnosticsTestWithStdlibGenerated extends AbstractFi
runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt38766.kt"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt38766.kt");
} }
@TestMetadata("kt41164.kt")
public void testKt41164() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt41164.kt");
}
@TestMetadata("nestedLambdaInferenceWithListMap.kt") @TestMetadata("nestedLambdaInferenceWithListMap.kt")
public void testNestedLambdaInferenceWithListMap() throws Exception { public void testNestedLambdaInferenceWithListMap() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/nestedLambdaInferenceWithListMap.kt"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/nestedLambdaInferenceWithListMap.kt");
@@ -1708,6 +1708,11 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
} }
@TestMetadata("kt41164.kt")
public void testKt41164() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/kt41164.kt");
}
@TestMetadata("lackOfNullCheckOnNullableInsideBuild.kt") @TestMetadata("lackOfNullCheckOnNullableInsideBuild.kt")
public void testLackOfNullCheckOnNullableInsideBuild() throws Exception { public void testLackOfNullCheckOnNullableInsideBuild() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/lackOfNullCheckOnNullableInsideBuild.kt"); runTest("compiler/testData/codegen/box/builderInference/lackOfNullCheckOnNullableInsideBuild.kt");
@@ -82,6 +82,7 @@ class DelegatedPropertyInferenceSession(
override fun inferPostponedVariables( override fun inferPostponedVariables(
lambda: ResolvedLambdaAtom, lambda: ResolvedLambdaAtom,
initialStorage: ConstraintStorage, initialStorage: ConstraintStorage,
completionMode: KotlinConstraintSystemCompleter.ConstraintSystemCompletionMode,
diagnosticsHolder: KotlinDiagnosticsHolder diagnosticsHolder: KotlinDiagnosticsHolder
): Map<TypeConstructor, UnwrappedType> = emptyMap() ): Map<TypeConstructor, UnwrappedType> = emptyMap()
@@ -103,6 +104,7 @@ class InferenceSessionForExistingCandidates(private val resolveReceiverIndepende
override fun inferPostponedVariables( override fun inferPostponedVariables(
lambda: ResolvedLambdaAtom, lambda: ResolvedLambdaAtom,
initialStorage: ConstraintStorage, initialStorage: ConstraintStorage,
completionMode: KotlinConstraintSystemCompleter.ConstraintSystemCompletionMode,
diagnosticsHolder: KotlinDiagnosticsHolder diagnosticsHolder: KotlinDiagnosticsHolder
): Map<TypeConstructor, UnwrappedType> = emptyMap() ): Map<TypeConstructor, UnwrappedType> = emptyMap()
@@ -147,7 +147,8 @@ class CoroutineInferenceSession(
override fun inferPostponedVariables( override fun inferPostponedVariables(
lambda: ResolvedLambdaAtom, lambda: ResolvedLambdaAtom,
initialStorage: ConstraintStorage, initialStorage: ConstraintStorage,
diagnosticsHolder: KotlinDiagnosticsHolder completionMode: KotlinConstraintSystemCompleter.ConstraintSystemCompletionMode,
diagnosticsHolder: KotlinDiagnosticsHolder,
): Map<TypeConstructor, UnwrappedType>? { ): Map<TypeConstructor, UnwrappedType>? {
val (commonSystem, effectivelyEmptyConstraintSystem) = buildCommonSystem(initialStorage) val (commonSystem, effectivelyEmptyConstraintSystem) = buildCommonSystem(initialStorage)
if (effectivelyEmptyConstraintSystem) { if (effectivelyEmptyConstraintSystem) {
@@ -160,6 +161,7 @@ class CoroutineInferenceSession(
context, context,
builtIns.unitType, builtIns.unitType,
partiallyResolvedCallsInfo.map { it.callResolutionResult.resultCallAtom }, partiallyResolvedCallsInfo.map { it.callResolutionResult.resultCallAtom },
completionMode,
diagnosticsHolder diagnosticsHolder
) )
@@ -81,15 +81,20 @@ abstract class ManyCandidatesResolver<D : CallableDescriptor>(
} }
fun runCompletion(constraintSystem: NewConstraintSystem, atoms: List<ResolvedAtom>) { fun runCompletion(constraintSystem: NewConstraintSystem, atoms: List<ResolvedAtom>) {
val completionMode = KotlinConstraintSystemCompleter.ConstraintSystemCompletionMode.FULL
kotlinConstraintSystemCompleter.runCompletion( kotlinConstraintSystemCompleter.runCompletion(
constraintSystem.asConstraintSystemCompleterContext(), constraintSystem.asConstraintSystemCompleterContext(),
KotlinConstraintSystemCompleter.ConstraintSystemCompletionMode.FULL, completionMode,
atoms, atoms,
builtIns.unitType, builtIns.unitType,
diagnosticHolder diagnosticHolder
) { ) {
postponedArgumentsAnalyzer.analyze( postponedArgumentsAnalyzer.analyze(
constraintSystem.asPostponedArgumentsAnalyzerContext(), resolutionCallbacks, it, diagnosticHolder constraintSystem.asPostponedArgumentsAnalyzerContext(),
resolutionCallbacks,
it,
completionMode,
diagnosticHolder
) )
} }
@@ -22,6 +22,7 @@ interface InferenceSession {
override fun inferPostponedVariables( override fun inferPostponedVariables(
lambda: ResolvedLambdaAtom, lambda: ResolvedLambdaAtom,
initialStorage: ConstraintStorage, initialStorage: ConstraintStorage,
completionMode: KotlinConstraintSystemCompleter.ConstraintSystemCompletionMode,
diagnosticsHolder: KotlinDiagnosticsHolder diagnosticsHolder: KotlinDiagnosticsHolder
): Map<TypeConstructor, UnwrappedType> = emptyMap() ): Map<TypeConstructor, UnwrappedType> = emptyMap()
@@ -44,6 +45,7 @@ interface InferenceSession {
fun inferPostponedVariables( fun inferPostponedVariables(
lambda: ResolvedLambdaAtom, lambda: ResolvedLambdaAtom,
initialStorage: ConstraintStorage, initialStorage: ConstraintStorage,
completionMode: KotlinConstraintSystemCompleter.ConstraintSystemCompletionMode,
diagnosticsHolder: KotlinDiagnosticsHolder diagnosticsHolder: KotlinDiagnosticsHolder
): Map<TypeConstructor, UnwrappedType>? ): Map<TypeConstructor, UnwrappedType>?
@@ -115,6 +115,7 @@ class KotlinCallCompleter(
firstCandidate.getSystem().asPostponedArgumentsAnalyzerContext(), firstCandidate.getSystem().asPostponedArgumentsAnalyzerContext(),
resolutionCallbacks, resolutionCallbacks,
firstAtom, firstAtom,
ConstraintSystemCompletionMode.FULL,
diagnosticHolderForLambda, diagnosticHolderForLambda,
) )
@@ -124,6 +125,7 @@ class KotlinCallCompleter(
candidate.getSystem().asPostponedArgumentsAnalyzerContext(), candidate.getSystem().asPostponedArgumentsAnalyzerContext(),
atom, atom,
results, results,
ConstraintSystemCompletionMode.FULL,
diagnosticHolderForLambda diagnosticHolderForLambda
) )
} }
@@ -228,6 +230,7 @@ class KotlinCallCompleter(
constraintSystem.asPostponedArgumentsAnalyzerContext(), constraintSystem.asPostponedArgumentsAnalyzerContext(),
resolutionCallbacks, resolutionCallbacks,
it, it,
completionMode,
diagnosticsHolder diagnosticsHolder
) )
} }
@@ -13,6 +13,7 @@ import org.jetbrains.kotlin.descriptors.annotations.Annotations
import org.jetbrains.kotlin.descriptors.annotations.FilteredAnnotations import org.jetbrains.kotlin.descriptors.annotations.FilteredAnnotations
import org.jetbrains.kotlin.resolve.calls.inference.ConstraintSystemBuilder import org.jetbrains.kotlin.resolve.calls.inference.ConstraintSystemBuilder
import org.jetbrains.kotlin.resolve.calls.inference.addSubsystemFromArgument import org.jetbrains.kotlin.resolve.calls.inference.addSubsystemFromArgument
import org.jetbrains.kotlin.resolve.calls.inference.components.KotlinConstraintSystemCompleter
import org.jetbrains.kotlin.resolve.calls.inference.components.NewTypeSubstitutorByConstructorMap import org.jetbrains.kotlin.resolve.calls.inference.components.NewTypeSubstitutorByConstructorMap
import org.jetbrains.kotlin.resolve.calls.inference.model.ConstraintStorage import org.jetbrains.kotlin.resolve.calls.inference.model.ConstraintStorage
import org.jetbrains.kotlin.resolve.calls.inference.model.CoroutinePosition import org.jetbrains.kotlin.resolve.calls.inference.model.CoroutinePosition
@@ -47,15 +48,20 @@ class PostponedArgumentsAnalyzer(
c: Context, c: Context,
resolutionCallbacks: KotlinResolutionCallbacks, resolutionCallbacks: KotlinResolutionCallbacks,
argument: ResolvedAtom, argument: ResolvedAtom,
completionMode: KotlinConstraintSystemCompleter.ConstraintSystemCompletionMode,
diagnosticsHolder: KotlinDiagnosticsHolder diagnosticsHolder: KotlinDiagnosticsHolder
) { ) {
when (argument) { when (argument) {
is ResolvedLambdaAtom -> is ResolvedLambdaAtom ->
analyzeLambda(c, resolutionCallbacks, argument, diagnosticsHolder) analyzeLambda(c, resolutionCallbacks, argument, completionMode, diagnosticsHolder)
is LambdaWithTypeVariableAsExpectedTypeAtom -> is LambdaWithTypeVariableAsExpectedTypeAtom ->
analyzeLambda( analyzeLambda(
c, resolutionCallbacks, argument.transformToResolvedLambda(c.getBuilder(), diagnosticsHolder), diagnosticsHolder c,
resolutionCallbacks,
argument.transformToResolvedLambda(c.getBuilder(), diagnosticsHolder),
completionMode,
diagnosticsHolder
) )
is ResolvedCallableReferenceAtom -> is ResolvedCallableReferenceAtom ->
@@ -84,6 +90,7 @@ class PostponedArgumentsAnalyzer(
c: Context, c: Context,
resolutionCallbacks: KotlinResolutionCallbacks, resolutionCallbacks: KotlinResolutionCallbacks,
lambda: ResolvedLambdaAtom, lambda: ResolvedLambdaAtom,
completionMode: KotlinConstraintSystemCompleter.ConstraintSystemCompletionMode,
diagnosticHolder: KotlinDiagnosticsHolder, diagnosticHolder: KotlinDiagnosticsHolder,
): ReturnArgumentsAnalysisResult { ): ReturnArgumentsAnalysisResult {
val substitutorAndStubsForLambdaAnalysis = c.createSubstituteFunctorForLambdaAnalysis() val substitutorAndStubsForLambdaAnalysis = c.createSubstituteFunctorForLambdaAnalysis()
@@ -142,7 +149,7 @@ class PostponedArgumentsAnalyzer(
convertedAnnotations ?: Annotations.EMPTY, convertedAnnotations ?: Annotations.EMPTY,
substitutorAndStubsForLambdaAnalysis.stubsForPostponedVariables.cast(), substitutorAndStubsForLambdaAnalysis.stubsForPostponedVariables.cast(),
) )
applyResultsOfAnalyzedLambdaToCandidateSystem(c, lambda, returnArgumentsAnalysisResult, diagnosticHolder, substitute) applyResultsOfAnalyzedLambdaToCandidateSystem(c, lambda, returnArgumentsAnalysisResult, completionMode, diagnosticHolder, substitute)
return returnArgumentsAnalysisResult return returnArgumentsAnalysisResult
} }
@@ -150,6 +157,7 @@ class PostponedArgumentsAnalyzer(
c: Context, c: Context,
lambda: ResolvedLambdaAtom, lambda: ResolvedLambdaAtom,
returnArgumentsAnalysisResult: ReturnArgumentsAnalysisResult, returnArgumentsAnalysisResult: ReturnArgumentsAnalysisResult,
completionMode: KotlinConstraintSystemCompleter.ConstraintSystemCompletionMode,
diagnosticHolder: KotlinDiagnosticsHolder, diagnosticHolder: KotlinDiagnosticsHolder,
substitute: (KotlinType) -> UnwrappedType = c.createSubstituteFunctorForLambdaAnalysis().substitute substitute: (KotlinType) -> UnwrappedType = c.createSubstituteFunctorForLambdaAnalysis().substitute
) { ) {
@@ -191,7 +199,12 @@ class PostponedArgumentsAnalyzer(
if (inferenceSession != null && lambda.atom.hasBuilderInferenceAnnotation) { if (inferenceSession != null && lambda.atom.hasBuilderInferenceAnnotation) {
val storageSnapshot = c.getBuilder().currentStorage() val storageSnapshot = c.getBuilder().currentStorage()
val postponedVariables = inferenceSession.inferPostponedVariables(lambda, storageSnapshot, diagnosticHolder) val postponedVariables = inferenceSession.inferPostponedVariables(
lambda,
storageSnapshot,
completionMode,
diagnosticHolder
)
if (postponedVariables == null) { if (postponedVariables == null) {
c.getBuilder().removePostponedVariables() c.getBuilder().removePostponedVariables()
return return
@@ -73,10 +73,11 @@ class KotlinConstraintSystemCompleter(
c: Context, c: Context,
topLevelType: UnwrappedType, topLevelType: UnwrappedType,
topLevelAtoms: List<ResolvedAtom>, topLevelAtoms: List<ResolvedAtom>,
completionMode: ConstraintSystemCompletionMode,
diagnosticsHolder: KotlinDiagnosticsHolder diagnosticsHolder: KotlinDiagnosticsHolder
) { ) {
c.runCompletion( c.runCompletion(
ConstraintSystemCompletionMode.FULL, completionMode,
topLevelAtoms, topLevelAtoms,
topLevelType, topLevelType,
diagnosticsHolder, diagnosticsHolder,
@@ -0,0 +1,24 @@
// ISSUE: KT-41164
// WITH_RUNTIME
import kotlin.experimental.ExperimentalTypeInference
interface MyProducerScope<in E>
interface MyFlow<out T>
fun <K> select(x: K, y: K): K = x
@OptIn(ExperimentalTypeInference::class)
fun <T> myCallbackFlow(@BuilderInference block: MyProducerScope<T>.() -> Unit): MyFlow<T> = null!!
fun MyProducerScope<*>.myAwaitClose(block: () -> Unit = {}) {}
fun <E> myEmptyFlow(): MyFlow<E> = null!!
fun test(): MyFlow<Int> {
return select(
myCallbackFlow {
myAwaitClose {}
},
myEmptyFlow()
)
}
fun box(): String = "OK"
@@ -0,0 +1,25 @@
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNUSED_PARAMETER -EXPERIMENTAL_IS_NOT_ENABLED
// ISSUE: KT-41164
import kotlin.experimental.ExperimentalTypeInference
interface MyProducerScope<in E>
interface MyFlow<out T>
fun <K> select(x: K, y: K): K = x
@OptIn(ExperimentalTypeInference::class)
fun <T> myCallbackFlow(@BuilderInference block: MyProducerScope<T>.() -> Unit): MyFlow<T> = null!!
fun MyProducerScope<*>.myAwaitClose(block: () -> Unit = {}) {}
fun <T> myEmptyFlow(): MyFlow<T> = null!!
fun test(): MyFlow<Int> {
return select(
<!DEBUG_INFO_EXPRESSION_TYPE("MyFlow<kotlin.Any?>")!>myCallbackFlow <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function1<MyProducerScope<kotlin.Any?>, kotlin.Unit>")!>{
myAwaitClose {}
}<!><!>,
myEmptyFlow()
)
}
@@ -0,0 +1,25 @@
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNUSED_PARAMETER -EXPERIMENTAL_IS_NOT_ENABLED
// ISSUE: KT-41164
import kotlin.experimental.ExperimentalTypeInference
interface MyProducerScope<in E>
interface MyFlow<out T>
fun <K> select(x: K, y: K): K = x
@OptIn(ExperimentalTypeInference::class)
fun <T> myCallbackFlow(@BuilderInference block: MyProducerScope<T>.() -> Unit): MyFlow<T> = null!!
fun MyProducerScope<*>.myAwaitClose(block: () -> Unit = {}) {}
fun <T> myEmptyFlow(): MyFlow<T> = null!!
fun test(): MyFlow<Int> {
return select(
<!DEBUG_INFO_EXPRESSION_TYPE("MyFlow<kotlin.Int>")!>myCallbackFlow <!DEBUG_INFO_EXPRESSION_TYPE("MyProducerScope<kotlin.Int>.() -> kotlin.Unit")!>{
myAwaitClose {}
}<!><!>,
myEmptyFlow()
)
}
@@ -0,0 +1,19 @@
package
@kotlin.OptIn(markerClass = {kotlin.experimental.ExperimentalTypeInference::class}) public fun </*0*/ T> myCallbackFlow(/*0*/ @kotlin.BuilderInference block: MyProducerScope<T>.() -> kotlin.Unit): MyFlow<T>
public fun </*0*/ T> myEmptyFlow(): MyFlow<T>
public fun </*0*/ K> select(/*0*/ x: K, /*1*/ y: K): K
public fun test(): MyFlow<kotlin.Int>
public fun MyProducerScope<*>.myAwaitClose(/*0*/ block: () -> kotlin.Unit = ...): kotlin.Unit
public interface MyFlow</*0*/ out T> {
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
public interface MyProducerScope</*0*/ in E> {
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
@@ -2136,6 +2136,11 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW
runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt38766.kt"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt38766.kt");
} }
@TestMetadata("kt41164.kt")
public void testKt41164() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt41164.kt");
}
@TestMetadata("nestedLambdaInferenceWithListMap.kt") @TestMetadata("nestedLambdaInferenceWithListMap.kt")
public void testNestedLambdaInferenceWithListMap() throws Exception { public void testNestedLambdaInferenceWithListMap() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/nestedLambdaInferenceWithListMap.kt"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/nestedLambdaInferenceWithListMap.kt");
@@ -2136,6 +2136,11 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno
runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt38766.kt"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt38766.kt");
} }
@TestMetadata("kt41164.kt")
public void testKt41164() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt41164.kt");
}
@TestMetadata("nestedLambdaInferenceWithListMap.kt") @TestMetadata("nestedLambdaInferenceWithListMap.kt")
public void testNestedLambdaInferenceWithListMap() throws Exception { public void testNestedLambdaInferenceWithListMap() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/nestedLambdaInferenceWithListMap.kt"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/nestedLambdaInferenceWithListMap.kt");
@@ -1728,6 +1728,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
} }
@TestMetadata("kt41164.kt")
public void testKt41164() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/kt41164.kt");
}
@TestMetadata("lackOfNullCheckOnNullableInsideBuild.kt") @TestMetadata("lackOfNullCheckOnNullableInsideBuild.kt")
public void testLackOfNullCheckOnNullableInsideBuild() throws Exception { public void testLackOfNullCheckOnNullableInsideBuild() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/lackOfNullCheckOnNullableInsideBuild.kt"); runTest("compiler/testData/codegen/box/builderInference/lackOfNullCheckOnNullableInsideBuild.kt");
@@ -1728,6 +1728,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
} }
@TestMetadata("kt41164.kt")
public void testKt41164() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/kt41164.kt");
}
@TestMetadata("lackOfNullCheckOnNullableInsideBuild.kt") @TestMetadata("lackOfNullCheckOnNullableInsideBuild.kt")
public void testLackOfNullCheckOnNullableInsideBuild() throws Exception { public void testLackOfNullCheckOnNullableInsideBuild() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/lackOfNullCheckOnNullableInsideBuild.kt"); runTest("compiler/testData/codegen/box/builderInference/lackOfNullCheckOnNullableInsideBuild.kt");
@@ -1708,6 +1708,11 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
} }
@TestMetadata("kt41164.kt")
public void testKt41164() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/kt41164.kt");
}
@TestMetadata("lackOfNullCheckOnNullableInsideBuild.kt") @TestMetadata("lackOfNullCheckOnNullableInsideBuild.kt")
public void testLackOfNullCheckOnNullableInsideBuild() throws Exception { public void testLackOfNullCheckOnNullableInsideBuild() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/lackOfNullCheckOnNullableInsideBuild.kt"); runTest("compiler/testData/codegen/box/builderInference/lackOfNullCheckOnNullableInsideBuild.kt");
@@ -1328,6 +1328,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
} }
@TestMetadata("kt41164.kt")
public void testKt41164() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/kt41164.kt");
}
@TestMetadata("lackOfNullCheckOnNullableInsideBuild.kt") @TestMetadata("lackOfNullCheckOnNullableInsideBuild.kt")
public void testLackOfNullCheckOnNullableInsideBuild() throws Exception { public void testLackOfNullCheckOnNullableInsideBuild() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/lackOfNullCheckOnNullableInsideBuild.kt"); runTest("compiler/testData/codegen/box/builderInference/lackOfNullCheckOnNullableInsideBuild.kt");
@@ -1328,6 +1328,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
} }
@TestMetadata("kt41164.kt")
public void testKt41164() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/kt41164.kt");
}
@TestMetadata("lackOfNullCheckOnNullableInsideBuild.kt") @TestMetadata("lackOfNullCheckOnNullableInsideBuild.kt")
public void testLackOfNullCheckOnNullableInsideBuild() throws Exception { public void testLackOfNullCheckOnNullableInsideBuild() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/lackOfNullCheckOnNullableInsideBuild.kt"); runTest("compiler/testData/codegen/box/builderInference/lackOfNullCheckOnNullableInsideBuild.kt");
@@ -1328,6 +1328,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true);
} }
@TestMetadata("kt41164.kt")
public void testKt41164() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/kt41164.kt");
}
@TestMetadata("lackOfNullCheckOnNullableInsideBuild.kt") @TestMetadata("lackOfNullCheckOnNullableInsideBuild.kt")
public void testLackOfNullCheckOnNullableInsideBuild() throws Exception { public void testLackOfNullCheckOnNullableInsideBuild() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/lackOfNullCheckOnNullableInsideBuild.kt"); runTest("compiler/testData/codegen/box/builderInference/lackOfNullCheckOnNullableInsideBuild.kt");