[FIR-TEST] Add new testdata generated after changes in previous commit
This commit is contained in:
Vendored
+17
@@ -0,0 +1,17 @@
|
||||
// !LANGUAGE: +AllowContractsForCustomFunctions +UseReturnsEffect
|
||||
// !USE_EXPERIMENTAL: kotlin.contracts.ExperimentalContracts
|
||||
// !DIAGNOSTICS: -INVISIBLE_REFERENCE -INVISIBLE_MEMBER
|
||||
|
||||
import kotlin.contracts.*
|
||||
|
||||
fun myAssert(condition: Boolean, message: String = "") {
|
||||
contract {
|
||||
returns() implies (condition)
|
||||
}
|
||||
if (!condition) throw kotlin.<!UNRESOLVED_REFERENCE!>IllegalArgumentException<!>(message)
|
||||
}
|
||||
|
||||
fun test(x: Any?) {
|
||||
myAssert(x is String)
|
||||
x.<!UNRESOLVED_REFERENCE!>length<!>
|
||||
}
|
||||
Reference in New Issue
Block a user