Ignore:
Timestamp:
Aug 31, 2023, 11:31:15 PM (2 years ago)
Author:
JiadaL <j82liang@…>
Branches:
master
Children:
950c58e
Parents:
92355883 (diff), 686912c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Resolve conflict

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/exceptions/polymorphic.cfa

    r92355883 r2a301ff  
    11// Testing polymophic exception types.
     2
     3#include <fstream.hfa>
    24
    35forall(T &) exception proxy {};
     
    1315                throw an_int;
    1416        } catch (proxy(int) *) {
    15                 printf("terminate catch\n");
     17                sout | "terminate catch";
    1618        }
    1719
     
    1921                throwResume a_char;
    2022        } catchResume (proxy(char) *) {
    21                 printf("resume catch\n");
     23                sout | "resume catch";
    2224        }
    2325
     
    2527                throw a_char;
    2628        } catch (proxy(int) *) {
    27                 printf("caught proxy(int)\n");
     29                sout | "caught proxy(int)";
    2830        } catch (proxy(char) *) {
    29                 printf("caught proxy(char)\n");
     31                sout | "caught proxy(char)";
    3032        }
    3133}
     
    4446                throw except;
    4547        } catch (cell(int) * error) {
    46                 printf("%d\n", error->data);
     48                sout | error->data;
    4749        }
    4850
     
    5052                cell(bool) ball = {&bool_cell, false};
    5153                throwResume ball;
    52                 printf("%i\n", ball.data);
     54                sout | ball.data;
    5355        } catchResume (cell(bool) * error) {
    54                 printf("%i\n", error->data);
     56                sout | error->data;
    5557                error->data = true;
    5658        }
     
    5961int main(int argc, char * argv[]) {
    6062        proxy_test();
    61         printf("\n");
     63        sout | nl;
    6264        cell_test();
    6365}
Note: See TracChangeset for help on using the changeset viewer.