[FIR-TEST] Move existing contract tests to fromLibrary directory
This commit is contained in:
Vendored
+14
@@ -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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user