fails:The def keyword within a closure looks outside the closure for the visibility
