class Test var _x as int get x from var cue init(x as int) require x > 0 ensure .x == if(old .x, old .x, .x) body base.init _x = x cue init(s as String) require s.length > 0 body base.init cue init(c as char) ensure _x > 0 body base.init _x = 0 def main is shared Test(5) expect RequireException Test('') expect EnsureException Test(c'x')