Prohibit using suspend functions as SAM in fun interfaces

#KT-40978 Fixed
This commit is contained in:
Mikhail Zarechenskiy
2020-08-10 18:49:55 +03:00
parent 607f99ed3c
commit e49cdf0ca2
12 changed files with 60 additions and 10 deletions
@@ -2,7 +2,7 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_EXPRESSION
fun interface SuspendRunnable {
suspend fun run()
<!FUN_INTERFACE_WITH_SUSPEND_FUNCTION!>suspend<!> fun run()
}
fun foo(r: SuspendRunnable) {}