[FIR-TEST] Add new testdata generated after changes in previous commit

This commit is contained in:
Dmitriy Novozhilov
2019-12-11 16:16:22 +03:00
parent e9c02a1cca
commit 2536fa0cd5
4578 changed files with 104067 additions and 1 deletions
@@ -0,0 +1,33 @@
// !LANGUAGE: +ReadDeserializedContracts +UseReturnsEffect
// !DIAGNOSTICS: -INVISIBLE_REFERENCE -INVISIBLE_MEMBER
fun testCheckSmartcast(x: Any?) {
check(x is String)
x.length
}
fun testCheckUnreachableCode() {
check(false)
// Can't be reported without notion of 'iff'
println("Can't get here!")
}
fun testCheckWithMessage(x: Any?) {
check(x is String) { "x is not String!" }
x.length
}
fun testCheckWithFailingMessage(x: Any?) {
check(x is String) { throw kotlin.<!UNRESOLVED_REFERENCE!>IllegalStateException<!>("What a strange idea") }
x.length
}
fun testCheckNotNullWithMessage(x: Int?) {
checkNotNull(x) { "x is null!" }
x.inc()
}
fun testCheckNotNull(x: Int?) {
checkNotNull(x)
x.inc()
}