Files
kotlin-fork/compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/modifiers.kt
T
2016-10-24 18:00:02 +03:00

16 lines
403 B
Kotlin
Vendored

// !CHECK_TYPE
// !DIAGNOSTICS: -UNUSED_PARAMETER
data class A(val x: Int, val y: String)
fun foo(block: (A) -> Unit) { }
@Target(AnnotationTarget.VALUE_PARAMETER)
annotation class Ann
fun bar() {
foo { (<!WRONG_MODIFIER_TARGET!>private<!> <!WRONG_MODIFIER_TARGET!>inline<!> a, <!WRONG_ANNOTATION_TARGET!>@Ann<!> b) ->
a checkType { _<Int>() }
b checkType { _<String>() }
}
}