Now compiler also supports 'when' clauses in visits.
Added a visit test case with when clauses.