Parsing
These errors arise from pre, post, or invariant blocks which cannot be translated into SMT formulae.
For example, we cannot translate method calls to SMT:
fun f(xs: List[String]): String {
pre({ !xs.get(0).isEmpty() }) { ... }
...
}Content copied to clipboard
The Kotlin compiler won't catch these errors in its own analysis phase (like it would do with a type error), since this is perfectly good Kotlin code. However, it seems desirable for the programmer to know that a particular language feature cannot be used in these blocks.