[FIR] Add NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY diagnostic
This commit is contained in:
committed by
teamcityserver
parent
151478aa27
commit
a6984c5198
+4
-2
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user