AA: expected type for expression passed to vararg
This commit is contained in:
committed by
Yan Zhulanow
parent
4f8dad3e4b
commit
4beb55179b
+7
@@ -0,0 +1,7 @@
|
||||
fun dummy() = Any()
|
||||
|
||||
fun runRunnable(r : java.lang.Runnable) = r()
|
||||
|
||||
fun test() {
|
||||
runRunnable(:<caret>:dummy)
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
expression: ::dummy
|
||||
expected type: java/lang/Runnable
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
fun dummy() = Any()
|
||||
|
||||
fun runRunnables(vararg rs : java.lang.Runnable) {
|
||||
rs.forEach {
|
||||
it.run()
|
||||
}
|
||||
}
|
||||
|
||||
fun test() {
|
||||
runRunnables(:<caret>:dummy)
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
expression: ::dummy
|
||||
expected type: java/lang/Runnable
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
fun dummy() = Any()
|
||||
|
||||
fun test() {
|
||||
:<caret>:dummy as java.lang.Runnable
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
expression: ::dummy
|
||||
expected type: java/lang/Runnable
|
||||
Reference in New Issue
Block a user