You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fundomain(): Option<Domain> {
val parts = value.split("@") // no pattern matching in kotlin :((((returnif (parts.size !=2)
NoneelseSome(Domain(parts[1]))
}
results in the error:
e: /Users/peter/develop/x.kt: (69, 25): pre-condition `index within bounds` is not satisfied in `parts[1]`
-> unsatisfiable constraint: `(1 >= 0) && (1 < (parts.size))`
->
`1` bound to param `index` in `kotlin.collections.List.get`
-> in branch: value != null, !(parts.size != 2), cond50, parts != null
e: /Users/peter/develop/x.kt: (69, 25): pre-condition `index within bounds` is not satisfied in `parts[1]`
-> unsatisfiable constraint: `(1 >= 0) && (1 < (parts.size))`
->
`1` bound to param `index` in `kotlin.collections.List.get`
-> in branch: value != null, !(parts.size != 2), cond50, parts != null, Domain != null, parts != null
it looks like !(parts.size != 2) is not being correctly interpreted to prove that parts.size == 2
The text was updated successfully, but these errors were encountered:
* Implement checks for getter/setter/delegates in properties
* Missing 'throw' for Kotlin
* Issue warnings if 'require' or 'assert' cannot be parsed
* Improve inference of primitive constraints
Fixes#999, #1000, #1002, #1003
given the code snippet:
results in the error:
it looks like
!(parts.size != 2)
is not being correctly interpreted to prove thatparts.size == 2
The text was updated successfully, but these errors were encountered: