class Test var _name as String var _didConstruct = false cue init(name as String) base.init _name = name _didConstruct = true get name as String require _didConstruct ensure result.length>0 body return _name set foo as String require value.length>0 ensure _didConstruct body _name = value def main is shared t = Test('aoeu') n = t.name t.foo= 'asdf' t = Test('') expect EnsureException n = t.name expect RequireException t.foo = '' CobraCore.noOp(n)