Files
kotlin-fork/compiler/testData/diagnostics/tests/functionAsExpression/Common.kt
T
Denis Zharkov 849b8acbf8 Replace annotations with brackets in testData
Just in tests that changed after deprecation
2015-05-07 22:36:16 +03:00

22 lines
546 B
Kotlin

// !CHECK_TYPE
// !DIAGNOSTICS: -UNUSED_PARAMETER
annotation class ann(val name: String)
val ok = "OK"
class A
val withName = fun name() {}
val extensionWithName = fun A.name() {}
val withoutName = fun () {}
val extensionWithoutName = fun A.() {}
fun withAnnotation() = @ann(ok) fun () {}
val withReturn = fun (): Int { return 5}
val withExpression = fun() = 5
val funfun = fun() = fun() = 5
val parentesized = (fun () {})
val parentesizedWithType = checkSubtype<() -> Unit>((fun () {}))
val withType = checkSubtype<() -> Unit>((fun () {}))