Add SingleUnderscoreForParameterName language feature
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
// !LANGUAGE: -SingleUnderscoreForParameterName
|
||||
|
||||
data class A(val x: Int, val y: Int)
|
||||
|
||||
fun foo(a: Array<A>) {
|
||||
val (<!UNSUPPORTED_FEATURE!>_<!>, y) = A(1, 2)
|
||||
y.hashCode()
|
||||
|
||||
val q1: (Int, String) -> Unit = {
|
||||
<!UNSUPPORTED_FEATURE!>_<!>, s -> s.hashCode()
|
||||
}
|
||||
q1(1, "")
|
||||
|
||||
val q2: (Int, String) -> Unit = fun(<!UNSUPPORTED_FEATURE!>_<!>: Int, s: String) {
|
||||
s.hashCode()
|
||||
}
|
||||
q2(1, "")
|
||||
|
||||
val q3: (A) -> Unit = {
|
||||
(<!UNSUPPORTED_FEATURE!>_<!>, y) -> y.hashCode()
|
||||
}
|
||||
q3(A(2, 3))
|
||||
|
||||
for ((<!UNSUPPORTED_FEATURE!>_<!>, z) in a) {
|
||||
z.hashCode()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package
|
||||
|
||||
public fun foo(/*0*/ a: kotlin.Array<A>): kotlin.Unit
|
||||
|
||||
public final data class A {
|
||||
public constructor A(/*0*/ x: kotlin.Int, /*1*/ y: kotlin.Int)
|
||||
public final val x: kotlin.Int
|
||||
public final val y: kotlin.Int
|
||||
public final operator /*synthesized*/ fun component1(): kotlin.Int
|
||||
public final operator /*synthesized*/ fun component2(): kotlin.Int
|
||||
public final /*synthesized*/ fun copy(/*0*/ x: kotlin.Int = ..., /*1*/ y: kotlin.Int = ...): 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