[FIR-TEST] Move existing contract tests to fromLibrary directory

This commit is contained in:
Dmitriy Novozhilov
2020-04-10 14:43:53 +03:00
parent ba35c43fe9
commit 3c33ee9c68
9 changed files with 24 additions and 11 deletions
@@ -0,0 +1,14 @@
fun test_1(s: String?) {
when {
!s.isNullOrEmpty() -> s.length // Should be OK
}
}
fun test_2(s: String?) {
// contracts related
if (s.isNullOrEmpty()) {
s.<!INAPPLICABLE_CANDIDATE!>length<!> // Should be bad
} else {
s.length // Should be OK
}
}