[FIR] Add NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY diagnostic

This commit is contained in:
Andrey Zinovyev
2021-07-08 15:29:31 +03:00
committed by teamcityserver
parent 151478aa27
commit a6984c5198
97 changed files with 939 additions and 1151 deletions
@@ -1,3 +1,5 @@
// COMPARE_WITH_LIGHT_TREE
package sum
import java.util.*
@@ -6,7 +8,7 @@ fun sum(a : IntArray) : Int {
<!UNRESOLVED_REFERENCE!>res<!> = 0
for (e in a)
<!UNRESOLVED_REFERENCE, VARIABLE_EXPECTED!>res<!> +=<!SYNTAX!><!>
}
<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY{LT}!>}<!>
fun main() {
test(0)
test(1, 1)
@@ -27,4 +29,4 @@ fun <T: Any> assertEquals(actual : T?, expected : T?, message : Any? = null) {
else
throw AssertionError(message)
}
}
}