Changeset 5a40e4e for tests/exceptions/polymorphic.cfa
- Timestamp:
- Sep 9, 2021, 3:56:32 PM (4 years ago)
- Branches:
- ADT, ast-experimental, enum, forall-pointer-decay, master, pthread-emulation, qualifiedEnum
- Children:
- d0b9247
- Parents:
- dd1cc02 (diff), d8d512e (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/exceptions/polymorphic.cfa
rdd1cc02 r5a40e4e 1 1 // Testing polymophic exception types. 2 2 3 #include <exception.hfa> 3 forall(T &) exception proxy {}; 4 4 5 EHM_FORALL_EXCEPTION(proxy, (T&), (T))(); 6 7 EHM_FORALL_VIRTUAL_TABLE(proxy, (int), proxy_int); 8 EHM_FORALL_VIRTUAL_TABLE(proxy, (char), proxy_char); 5 vtable(proxy(int)) proxy_int; 6 vtable(proxy(char)) proxy_char; 9 7 10 8 void proxy_test(void) { … … 33 31 } 34 32 35 EHM_FORALL_EXCEPTION(cell, (T), (T))( 33 forall(T) exception cell { 36 34 T data; 37 );35 }; 38 36 39 EHM_FORALL_VIRTUAL_TABLE(cell, (int), int_cell);40 EHM_FORALL_VIRTUAL_TABLE(cell, (char), char_cell);41 EHM_FORALL_VIRTUAL_TABLE(cell, (bool), bool_cell);37 vtable(cell(int)) int_cell; 38 vtable(cell(char)) char_cell; 39 vtable(cell(bool)) bool_cell; 42 40 43 41 void cell_test(void) {
Note:
See TracChangeset
for help on using the changeset viewer.