Ignore:
Timestamp:
Jan 11, 2017, 3:29:33 PM (8 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, 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.