Add test checking that fun isn't inherited from base interface
This commit is contained in:
+19
@@ -0,0 +1,19 @@
|
||||
// !LANGUAGE: +NewInference +FunctionalInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
fun interface Base {
|
||||
fun invoke()
|
||||
}
|
||||
|
||||
interface WithoutFun : Base
|
||||
fun interface WithFun : Base
|
||||
|
||||
fun takeBase(b: Base) {}
|
||||
fun takeWithoutFun(a: WithoutFun) {}
|
||||
fun takeWithFun(a: WithFun) {}
|
||||
|
||||
fun test() {
|
||||
takeBase {}
|
||||
takeWithoutFun(<!TYPE_MISMATCH!>{}<!>)
|
||||
takeWithFun {}
|
||||
}
|
||||
Reference in New Issue
Block a user