K2: reproduce KT-61844
This commit is contained in:
committed by
Space Team
parent
36df749697
commit
b9302869d5
@@ -0,0 +1,11 @@
|
||||
// ISSUE: KT-61844
|
||||
// FIR_DUMP
|
||||
|
||||
class Foo<I, out O>(
|
||||
private val transformer: (I) -> O,
|
||||
) {
|
||||
fun <I, O> transform(foo: Foo<I, O>, bar: I) {
|
||||
foo.<!FUNCTION_EXPECTED!>transformer<!>(bar)
|
||||
foo.<!INVISIBLE_REFERENCE!>transformer<!>.invoke(bar)
|
||||
}
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
FILE: privateInvokeOwner.fir.kt
|
||||
public final class Foo<I, out O> : R|kotlin/Any| {
|
||||
public constructor<I, out O>(transformer: R|(I) -> O|): R|Foo<I, O>| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
private/*private to this*/ final val transformer: R|(I) -> O| = R|<local>/transformer|
|
||||
private/*private to this*/ get(): R|(I) -> O|
|
||||
|
||||
public final fun <I, O> transform(foo: R|Foo<I, O>|, bar: R|I|): R|kotlin/Unit| {
|
||||
R|<local>/foo|.<Expression 'transformer' of type 'kotlin/Function1<I, O>' cannot be invoked as a function>#(R|<local>/bar|)
|
||||
R|<local>/foo|.R|SubstitutionOverride</Foo.transformer: R|(I) -> O|><HIDDEN: /Foo.transformer is invisible>#|.R|SubstitutionOverride<kotlin/Function1.invoke: R|O|>|(R|<local>/bar|)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
// ISSUE: KT-61844
|
||||
// FIR_DUMP
|
||||
|
||||
class Foo<I, out O>(
|
||||
private val transformer: (I) -> O,
|
||||
) {
|
||||
fun <I, O> transform(foo: Foo<I, O>, bar: I) {
|
||||
foo.transformer(bar)
|
||||
foo.transformer.invoke(bar)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package
|
||||
|
||||
public final class Foo</*0*/ I, /*1*/ out O> {
|
||||
public constructor Foo</*0*/ I, /*1*/ out O>(/*0*/ transformer: (I) -> O)
|
||||
private final val transformer: (I) -> O
|
||||
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 final fun </*0*/ I, /*1*/ O> transform(/*0*/ foo: Foo<I, O>, /*1*/ bar: I): kotlin.Unit
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user