Changeset 0a6d2045 for tests/exceptions


Ignore:
Timestamp:
Dec 20, 2023, 12:04:33 PM (8 months ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
master
Children:
523e300
Parents:
9fba8e6
Message:

You can how use local control flow out of 'catch' clauses. Added a test to show that it works.

Location:
tests/exceptions
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • tests/exceptions/.expect/try-ctrl-flow.txt

    r9fba8e6 r0a6d2045  
    1515exceptions/try-ctrl-flow.cfa:148:1 error: "break" outside a loop, "switch", or labelled block
    1616exceptions/try-ctrl-flow.cfa:159:1 error: "return" may not appear in a try statement with a catch clause
    17 exceptions/try-ctrl-flow.cfa:187:1 error: "return" may not appear in a catch clause
    18 exceptions/try-ctrl-flow.cfa:195:1 error: "return" may not appear in a catchResume clause
     17exceptions/try-ctrl-flow.cfa:187:1 error: "return" may not appear in a catchResume clause
  • tests/exceptions/try-ctrl-flow.cfa

    r9fba8e6 r0a6d2045  
    181181}
    182182
    183 void return_in_catch() {
    184         try {
    185                 ;
    186         } catch (nil_exception *) {
    187                 return;
    188         }
    189 }
    190 
    191183void return_in_catchResume() {
    192184        try {
Note: See TracChangeset for help on using the changeset viewer.