PSI2IR: capture adapted reference receiver to a local val if required
This commit is contained in:
Vendored
+15
@@ -0,0 +1,15 @@
|
||||
// !LANGUAGE: +NewInference, +FunctionReferenceWithDefaultValueAsOtherType
|
||||
|
||||
fun use(fn: (Int) -> Any) = fn(42)
|
||||
|
||||
class C(vararg xs: Int)
|
||||
|
||||
class Outer {
|
||||
inner class Inner(vararg xs: Int)
|
||||
}
|
||||
|
||||
fun testConstructor() = use(::C)
|
||||
|
||||
fun testInnerClassConstructor(outer: Outer) = use(outer::Inner)
|
||||
|
||||
fun testInnerClassConstructorCapturingOuter() = use(Outer()::Inner)
|
||||
Reference in New Issue
Block a user