navid/haze / c0b95f8eeae4f6db6308cd4c9942340bde71175d389cc031539ebe88ded804fc / samples/baseline_2.2/string_contract_error.hz

string_contract_error.hz

← samples/baseline_2.2 · 136 bytes · raw · download

pure fn nonempty(s str) bool => s != ""

fn need_text(s str) str
    : pre nonempty(s)
    => s

fn main() {
    print(need_text(""))
}