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,15 @@
// !LANGUAGE: +UnitConversion
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_EXPRESSION
fun interface KRunnable {
fun run()
}
fun foo(r: KRunnable) {}
abstract class SubInt : () -> Int
fun test(f: () -> Int, s: SubInt) {
foo(f)
foo(s)
}