Forbid default inline/crossinline suspend parameters

This commit is contained in:
Ilmir Usmanov
2018-02-20 14:05:03 +03:00
parent 7224b99928
commit 6b7173ba13
4 changed files with 36 additions and 0 deletions
@@ -0,0 +1,10 @@
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE -REDUNDANT_INLINE_SUSPEND_FUNCTION_TYPE -NOTHING_TO_INLINE
// SKIP_TXT
suspend inline fun test1(<!NOT_YET_SUPPORTED_IN_INLINE!>s : suspend () -> String = { "OK" }<!>) {}
suspend inline fun test2(s : () -> String = { "OK" }) {}
suspend inline fun test3(<!NOT_YET_SUPPORTED_IN_INLINE!>crossinline s : suspend () -> String = { "OK" }<!>) {}
suspend inline fun test4(crossinline s : () -> String = { "OK" }) {}
suspend inline fun test5(noinline s : suspend () -> String = { "OK" }) {}
suspend inline fun test6(noinline s : () -> String = { "OK" }) {}