[IR] update testdata: better support for IrCall
This commit is contained in:
committed by
teamcityserver
parent
ef2adfa835
commit
197f5ca885
@@ -27,8 +27,8 @@ class MyCandidate {
|
||||
}
|
||||
|
||||
private fun <A : Any?> allCandidatesResult(allCandidates: Collection<MyCandidate>): @FlexibleNullability OverloadResolutionResultsImpl<@FlexibleNullability A?>? {
|
||||
return apply<@FlexibleNullability OverloadResolutionResultsImpl<@FlexibleNullability A?>?>($receiver = nameNotFound<@FlexibleNullability A?>(), block = local fun @FlexibleNullability OverloadResolutionResultsImpl<@FlexibleNullability A?>?.<anonymous>() {
|
||||
<this> /*!! OverloadResolutionResultsImpl<@FlexibleNullability A?> */.setAllCandidates<@FlexibleNullability A?>(allCandidates = map<MyCandidate, ResolvedCall<A>>($receiver = allCandidates, transform = local fun <anonymous>(it: MyCandidate): ResolvedCall<A> {
|
||||
return nameNotFound<@FlexibleNullability A?>().apply<@FlexibleNullability OverloadResolutionResultsImpl<@FlexibleNullability A?>?>(block = local fun @FlexibleNullability OverloadResolutionResultsImpl<@FlexibleNullability A?>?.<anonymous>() {
|
||||
<this> /*!! OverloadResolutionResultsImpl<@FlexibleNullability A?> */.setAllCandidates<@FlexibleNullability A?>(allCandidates = allCandidates.map<MyCandidate, ResolvedCall<A>>(transform = local fun <anonymous>(it: MyCandidate): ResolvedCall<A> {
|
||||
return it.<get-resolvedCall>() as ResolvedCall<A>
|
||||
}
|
||||
))
|
||||
|
||||
@@ -60,19 +60,19 @@ class DeepCopyIrTreeWithSymbols {
|
||||
}
|
||||
|
||||
fun IrTypeParametersContainer.copyTypeParametersFrom(other: IrTypeParametersContainer) {
|
||||
<this>.<set-typeParameters>(<set-?> = map<IrTypeParameter, IrTypeParameter>($receiver = other.<get-typeParameters>(), transform = local fun <anonymous>(it: IrTypeParameter): IrTypeParameter {
|
||||
<this>.<set-typeParameters>(<set-?> = other.<get-typeParameters>().map<IrTypeParameter, IrTypeParameter>(transform = local fun <anonymous>(it: IrTypeParameter): IrTypeParameter {
|
||||
return <this>.copyTypeParameter(declaration = it)
|
||||
}
|
||||
))
|
||||
withinScope<Unit>($receiver = <this>.<get-typeRemapper>(), irTypeParametersContainer = <this>, fn = local fun <anonymous>() {
|
||||
<this>.<get-typeRemapper>().withinScope<Unit>(irTypeParametersContainer = <this>, fn = local fun <anonymous>() {
|
||||
{ // BLOCK
|
||||
val tmp0_iterator: Iterator<Pair<IrTypeParameter, IrTypeParameter>> = zip<IrTypeParameter, IrTypeParameter>($receiver = <this>.<get-typeParameters>(), other = other.<get-typeParameters>()).iterator()
|
||||
val tmp0_iterator: Iterator<Pair<IrTypeParameter, IrTypeParameter>> = <this>.<get-typeParameters>().zip<IrTypeParameter, IrTypeParameter>(other = other.<get-typeParameters>()).iterator()
|
||||
while (tmp0_iterator.hasNext()) { // BLOCK
|
||||
val tmp1_loop_parameter: Pair<IrTypeParameter, IrTypeParameter> = tmp0_iterator.next()
|
||||
val thisTypeParameter: IrTypeParameter = tmp1_loop_parameter.component1()
|
||||
val otherTypeParameter: IrTypeParameter = tmp1_loop_parameter.component2()
|
||||
{ // BLOCK
|
||||
mapTo<IrType, IrType, MutableList<IrType>>($receiver = otherTypeParameter.<get-superTypes>(), destination = thisTypeParameter.<get-superTypes>(), transform = local fun <anonymous>(it: IrType): IrType {
|
||||
otherTypeParameter.<get-superTypes>().mapTo<IrType, IrType, MutableList<IrType>>(destination = thisTypeParameter.<get-superTypes>(), transform = local fun <anonymous>(it: IrType): IrType {
|
||||
return <this>.<get-typeRemapper>().remapType(type = it)
|
||||
}
|
||||
) /*~> Unit */
|
||||
|
||||
@@ -4,7 +4,7 @@ private const val BACKSLASH: Char
|
||||
|
||||
private fun Reader.nextChar(): Char? {
|
||||
return { // BLOCK
|
||||
val tmp0_safe_receiver: Int? = takeUnless<Int>($receiver = <this>.read(), predicate = local fun <anonymous>(it: Int): Boolean {
|
||||
val tmp0_safe_receiver: Int? = <this>.read().takeUnless<Int>(predicate = local fun <anonymous>(it: Int): Boolean {
|
||||
return EQEQ(arg0 = it, arg1 = -1)
|
||||
}
|
||||
)
|
||||
@@ -16,17 +16,17 @@ private fun Reader.nextChar(): Char? {
|
||||
}
|
||||
|
||||
fun Reader.consumeRestOfQuotedSequence(sb: StringBuilder, quote: Char) {
|
||||
var ch: Char? = nextChar($receiver = <this>)
|
||||
var ch: Char? = <this>.nextChar()
|
||||
while (when {
|
||||
EQEQ(arg0 = ch, arg1 = null).not() -> EQEQ(arg0 = ch, arg1 = quote).not()
|
||||
true -> false
|
||||
}) { // BLOCK
|
||||
when {
|
||||
EQEQ(arg0 = ch, arg1 = <get-BACKSLASH>()) -> { // BLOCK
|
||||
val tmp0_safe_receiver: Char? = nextChar($receiver = <this>)
|
||||
val tmp0_safe_receiver: Char? = <this>.nextChar()
|
||||
when {
|
||||
EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null
|
||||
true -> let<Char, @FlexibleNullability StringBuilder?>($receiver = tmp0_safe_receiver, block = local fun <anonymous>(it: Char): @FlexibleNullability StringBuilder? {
|
||||
true -> tmp0_safe_receiver.let<Char, @FlexibleNullability StringBuilder?>(block = local fun <anonymous>(it: Char): @FlexibleNullability StringBuilder? {
|
||||
return sb.append(p0 = it)
|
||||
}
|
||||
)
|
||||
@@ -34,7 +34,7 @@ fun Reader.consumeRestOfQuotedSequence(sb: StringBuilder, quote: Char) {
|
||||
} /*~> Unit */
|
||||
true -> sb.append(p0 = ch) /*~> Unit */
|
||||
}
|
||||
ch = nextChar($receiver = <this>)
|
||||
ch = <this>.nextChar()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user