[FIR] Add NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY diagnostic
This commit is contained in:
committed by
teamcityserver
parent
151478aa27
commit
a6984c5198
-12
@@ -1,12 +0,0 @@
|
||||
package a
|
||||
|
||||
fun <R> foo (f: ()->R, r: MutableList<R>) = r.add(f())
|
||||
fun <R> bar (r: MutableList<R>, f: ()->R) = r.add(f())
|
||||
|
||||
fun test() {
|
||||
val a = foo({1}, arrayListOf("")) //no type inference error on 'arrayListOf'
|
||||
val b = bar(arrayListOf(""), {1})
|
||||
}
|
||||
|
||||
// from standard library
|
||||
fun <T> arrayListOf(vararg values: T) : MutableList<T> {}
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
package a
|
||||
|
||||
fun <R> foo (f: ()->R, r: MutableList<R>) = r.add(f())
|
||||
|
||||
Reference in New Issue
Block a user