Introduce Unit-conversions for simple arguments
This commit is contained in:
+15
@@ -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)
|
||||
}
|
||||
Reference in New Issue
Block a user