Introduce language feature DestructuringLambdaParameters
#KT-5828 Fixed
This commit is contained in:
Vendored
+13
@@ -0,0 +1,13 @@
|
||||
// !LANGUAGE: -DestructuringLambdaParameters
|
||||
// !CHECK_TYPE
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
data class A(val x: Int, val y: String)
|
||||
|
||||
fun foo(block: (A) -> Unit) { }
|
||||
|
||||
fun bar() {
|
||||
foo { <!UNSUPPORTED_FEATURE!>(a, b)<!> ->
|
||||
a checkType { _<Int>() }
|
||||
b checkType { _<String>() }
|
||||
}
|
||||
}
|
||||
Vendored
+16
@@ -0,0 +1,16 @@
|
||||
package
|
||||
|
||||
public fun bar(): kotlin.Unit
|
||||
public fun foo(/*0*/ block: (A) -> kotlin.Unit): kotlin.Unit
|
||||
|
||||
public final data class A {
|
||||
public constructor A(/*0*/ x: kotlin.Int, /*1*/ y: kotlin.String)
|
||||
public final val x: kotlin.Int
|
||||
public final val y: kotlin.String
|
||||
public final operator /*synthesized*/ fun component1(): kotlin.Int
|
||||
public final operator /*synthesized*/ fun component2(): kotlin.String
|
||||
public final /*synthesized*/ fun copy(/*0*/ x: kotlin.Int = ..., /*1*/ y: kotlin.String = ...): A
|
||||
public open override /*1*/ /*synthesized*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*synthesized*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*synthesized*/ fun toString(): kotlin.String
|
||||
}
|
||||
Reference in New Issue
Block a user