FIR: Properly build nullable suspend function types, and aggregate

modifiers and annotations within KtTypeReference/REFERENCE_TYPE nodes.
This commit is contained in:
Mark Punzalan
2021-04-08 09:35:10 +00:00
committed by TeamCityServer
parent 9cf5ac1fbd
commit 9a4742c08d
35 changed files with 734 additions and 28 deletions
@@ -1,6 +1,8 @@
// !LANGUAGE: +SuspendConversion
fun useSuspend(fn: suspend () -> Unit) {}
fun useSuspendNullable(fn: (suspend () -> Unit)?) {}
fun useSuspendNestedNullable(fn: ((suspend () -> Unit)?)?) {}
fun useSuspendInt(fn: suspend (Int) -> Unit) {}
suspend fun foo0() {}
@@ -30,4 +32,8 @@ fun testWithCoercionToUnit() { useSuspend(::foo3) }
fun testWithDefaults() { useSuspend(::foo4) }
fun testWithBoundReceiver() { useSuspend(C()::bar) }
fun testWithBoundReceiver() { useSuspend(C()::bar) }
fun testNullableParam() { useSuspendNullable(::foo1) }
fun testNestedNullableParam() { useSuspendNestedNullable(::foo1) }