class Test def foo(s as String?) as String? require s and s.length ensure result body return s def bar(x as int) as int require x ensure result body return x - 1 def baz .foo('aoeu') expect RequireException .foo('') expect RequireException .foo(nil) .bar(5) expect RequireException .bar(0) expect EnsureException .bar(1) def qux(i as int) require i > 0 # putting a comment here used to cause a parse error ensure true # putting a comment here used to cause a parse error body pass def main is shared Test().baz