Introduce Unit-conversions for simple arguments

This commit is contained in:
Mikhail Zarechenskiy
2020-06-02 15:04:39 +03:00
parent f08a45f2d4
commit 71cbe97688
23 changed files with 484 additions and 6 deletions
@@ -0,0 +1,14 @@
// !LANGUAGE: +UnitConversion +SuspendConversion
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_EXPRESSION
fun foo(f: suspend () -> Unit) {}
fun bar(): String = ""
abstract class SubInt : () -> Int
fun test(g: () -> Double, s: SubInt) {
foo(::bar)
foo(g)
foo(s)
}