Ignore:
Timestamp:
Jan 11, 2017, 3:29:33 PM (5 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, resolv-new, with_gc
Children:
d3a85240
Parents:
627f585
Message:

prevent generic parameters from polluting the outer scope in Box Pass2

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/tests/tupleVariadic.c

    r627f585 rdd0c97b  
    8989}
    9090
     91forall(otype T)
     92T * copy(T x) {
     93        // test calling new inside a polymorphic function
     94        return new(x);
     95}
     96
    9197int main() {
    9298        array * x0 = new();
     
    104110        array * x4 = new(10, 2, 3, 4);
    105111        print(x4);
     112
     113        int * ptr = copy(111111);
     114        printf("copy=%d\n", *ptr);
     115
    106116        printf("calling func\n");
    107117        func(3, 2.0, 111, 4.145);
Note: See TracChangeset for help on using the changeset viewer.