K2: repeat K1 representation for flexible type parameters
This commit changes the behavior of KT-59138 effectively declining it in 2.0. However, we plan to implement KT-59138 behavior under a feature flag in 2.0 (see KT-66447), and switch this feature on version 2.x. Also, this commit implements the LC resolution about postponing KT-57014 change. We don't have KT-57014 described behavior in 2.0 anymore. However, we plan to implement a deprecation warning here, see KT-65578. After this commit, 6 diagnostic tests become incorrectly broken: - 5 tests from PurelyImplementedCollection group - a test platformTypes/nullableTypeArgument.kt This commit also breaks currently fixed-in-k2 KT-50134 (it is fixed again in the following commits), as well as KT-58933 (it will remain not fixed till we enable KT-59138 behavior again). #KT-65596 In Progress #KT-57014 In Progress #KT-58933 Submitted
This commit is contained in:
committed by
Space Team
parent
7fd46f1450
commit
81414d758d
@@ -58,7 +58,7 @@ FILE fqName:<root> fileName:/AllCandidates.kt
|
||||
CALL 'public final fun apply <T> (block: @[ExtensionFunctionType] kotlin.Function1<T of kotlin.apply, kotlin.Unit>): T of kotlin.apply declared in kotlin' type=@[FlexibleNullability] <root>.OverloadResolutionResultsImpl<@[FlexibleNullability] A of <root>.allCandidatesResult?>? origin=null
|
||||
<T>: @[FlexibleNullability] <root>.OverloadResolutionResultsImpl<@[FlexibleNullability] A of <root>.allCandidatesResult?>?
|
||||
$receiver: CALL 'public open fun nameNotFound <R> (): @[FlexibleNullability] <root>.OverloadResolutionResultsImpl<@[FlexibleNullability] R of <root>.OverloadResolutionResultsImpl.nameNotFound?>? declared in <root>.OverloadResolutionResultsImpl' type=@[FlexibleNullability] <root>.OverloadResolutionResultsImpl<@[FlexibleNullability] A of <root>.allCandidatesResult?>? origin=null
|
||||
<R>: A of <root>.allCandidatesResult
|
||||
<R>: @[FlexibleNullability] A of <root>.allCandidatesResult?
|
||||
block: FUN_EXPR type=@[ExtensionFunctionType] kotlin.Function1<@[FlexibleNullability] <root>.OverloadResolutionResultsImpl<@[FlexibleNullability] A of <root>.allCandidatesResult?>?, kotlin.Unit> origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> ($receiver:@[FlexibleNullability] <root>.OverloadResolutionResultsImpl<@[FlexibleNullability] A of <root>.allCandidatesResult?>?) returnType:kotlin.Unit
|
||||
$receiver: VALUE_PARAMETER name:$this$apply type:@[FlexibleNullability] <root>.OverloadResolutionResultsImpl<@[FlexibleNullability] A of <root>.allCandidatesResult?>?
|
||||
|
||||
@@ -21,7 +21,7 @@ class ResolvedCall<C : Any?> {
|
||||
}
|
||||
|
||||
private fun <A : Any?> allCandidatesResult(allCandidates: Collection<MyCandidate>): @FlexibleNullability OverloadResolutionResultsImpl<@FlexibleNullability A?>? {
|
||||
return nameNotFound<A>().apply<@FlexibleNullability OverloadResolutionResultsImpl<@FlexibleNullability A?>?>(block = local fun @FlexibleNullability OverloadResolutionResultsImpl<@FlexibleNullability A?>?.<anonymous>() {
|
||||
return nameNotFound<@FlexibleNullability A?>().apply<@FlexibleNullability OverloadResolutionResultsImpl<@FlexibleNullability A?>?>(block = local fun @FlexibleNullability OverloadResolutionResultsImpl<@FlexibleNullability A?>?.<anonymous>() {
|
||||
$this$apply.setAllCandidates(allCandidates = allCandidates.map<MyCandidate, ResolvedCall<A>>(transform = local fun <anonymous>(it: MyCandidate): ResolvedCall<A> {
|
||||
return it.<get-resolvedCall>() as ResolvedCall<A>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user