Ignore:
Timestamp:
Jan 8, 2019, 11:31:21 AM (3 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer
Children:
08222c7, 274da98
Parents:
84b4d607 (diff), d5b2ac8 (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

    r84b4d607 r25cdca5  
    99// Author           : Rob Schluntz
    1010// Created On       : Tue Oct 17 12:19:48 2017
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Tue Oct 17 12:21:07 2017
    13 // Update Count     : 1
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Tue Dec 25 14:40:24 2018
     13// Update Count     : 3
    1414//
    1515
    1616#include <assert.h>
    1717#include <inttypes.h>
     18#include <fstream.hfa>
    1819
    1920forall(otype T)
     
    6162                int y = 456;
    6263                int z = f(x, y);
    63                 printf("%d %d %d\n", x, y, z);
     64                sout | x | y | z;
    6465        }
    65 
    6666        {
    6767                // explicitly specialize function
    6868                int (*f)(int) = ident;
    6969                ((int(*)(int))ident);
    70                 printf("%d %d\n", f(5), ((int(*)(int))ident)(5));
     70                sout | f(5) | ((int(*)(int))ident)(5);
    7171        }
    72 
    7372        {
    7473                // test aggregates with polymorphic members
     
    10099
    101100                void print(x_type x) {
    102                         printf("%"PRIu32"\n", x);
     101                        sout | x;
    103102                }
    104103
    105104                void print(y_type y) {
    106                         printf("%"PRIu64"\n", y);
     105                        sout | y;
    107106                }
    108107
Note: See TracChangeset for help on using the changeset viewer.