Ignore:
Timestamp:
Jan 20, 2021, 4:49:40 PM (3 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
454f478
Parents:
92bfda0 (diff), fd54fef (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:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/polymorphism.cfa

    r92bfda0 rdafbde8  
    1818#include <fstream.hfa>
    1919
    20 forall(otype T)
     20forall(T)
    2121T f(T x, T y) {
    2222        x = y;
     
    2424}
    2525
    26 forall(otype T) T ident(T x) {
     26forall(T) T ident(T x) {
    2727        return x;
    2828}
    2929
    30 forall( otype T, otype U )
     30forall( T, U )
    3131size_t struct_size( T i, U j ) {
    3232        struct S { T i; U j; };
     
    3434}
    3535
    36 forall( otype T, otype U )
     36forall( T, U )
    3737size_t union_size( T i, U j ) {
    3838        union B { T i; U j; };
     
    4141
    4242// perform some simple operations on aggregates of T and U
    43 forall( otype T | { void print(T); int ?==?(T, T); }, otype U | { void print(U); U ?=?(U&, zero_t); } )
     43forall( T | { void print(T); int ?==?(T, T); }, U | { void print(U); U ?=?(U&, zero_t); } )
    4444U foo(T i, U j) {
    4545        struct S { T i; U j; };
Note: See TracChangeset for help on using the changeset viewer.