Ignore:
Timestamp:
Dec 13, 2016, 3:56:44 PM (7 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:
fc638d2
Parents:
0f35657
Message:

added tests for polymorphic tuples and cast on tuples, updated a couple of other tests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/tests/completeTypeError.c

    r0f35657 rf7e749f  
    55forall(dtype T | sized(T)) void quux(T *);
    66
     7struct A; // incomplete
     8struct B {}; // complete
     9
    710int main() {
    811        int *i;
    912        void *v;
    1013
     14        // A * x;
     15        // A * y;
     16        // B * x;
     17        // B * z;
     18
    1119        // okay
    1220        *i;
     21        // *x; // picks B
     22        // *z;
    1323        foo(i);
    1424        bar(i);
     
    2333        // bad
    2434        *v;
     35        // *y;
    2536        baz(v);
    2637        quux(v);
    2738}
     39
    2840
    2941forall(otype T)
     
    6072        baz(z);
    6173}
    62 
Note: See TracChangeset for help on using the changeset viewer.