Opened 3 years ago

Closed 3 years ago

#173 closed defect (fixed)

Catch Declaration not Seen by Condition (New AST only)

Reported by: ajbeach Owned by:
Priority: major Component: cfa-cc
Version: 1.0 Keywords:


There is a bug where the declaration of a catch clause is not in scope when resolving the condition. This means the condition can't use the exception that has been caught to decide whether or not to handle it. A common use case.

The old AST has a rather messy fix that rewrites the catch statement into an encoded form and then undoing the operation before passing it onto another pass. However this doesn't work for the new AST and a different solution will be needed.

Change History (1)

comment:1 Changed 3 years ago by ajbeach

Resolution: fixed
Status: newclosed

We need mutates which could introduce a few extra clones (theoretically two per confrontational catch but more likely 0 or 1) but other than that I think issue mentioned was something the new ast actually does support. Its still a kind of messy operation but it works.

Note: See TracTickets for help on using tickets.