Changeset fd54fef for tests/errors


Ignore:
Timestamp:
Jan 19, 2021, 8:44:29 PM (5 years ago)
Author:
Michael Brooks <mlbrooks@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
dafbde8
Parents:
2f47ea4
Message:

Converting the project to use the new syntax for otype, dtype and ttytpe.

Changed prelude (gen), libcfa and test suite to use it. Added a simple deprecation rule of the old syntax to the parser; we might wish to support both syntaxes "officially," like with an extra CLI switch, but this measure should serve as a simple reminder for our team to try the new syntax.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/errors/completeType.cfa

    r2f47ea4 rfd54fef  
    11void foo(int *) {}
    22void bar(void *) {}
    3 forall(otype T) void baz(T *);
    4 forall(dtype T) void qux(T *);
    5 forall(dtype T | sized(T)) void quux(T *);
     3forall(T) void baz(T *);
     4forall(T &) void qux(T *);
     5forall(T & | sized(T)) void quux(T *);
    66
    77struct A;       // incomplete
     
    3939
    4040
    41 forall(otype T)
     41forall(T)
    4242void baz(T * x) {
    4343        // okay
     
    4949}
    5050
    51 forall(dtype T)
     51forall(T &)
    5252void qux(T * y) {
    5353        // okay
     
    6161}
    6262
    63 forall(dtype T | sized(T))
     63forall(T & | sized(T))
    6464void quux(T * z) {
    6565        // okay
Note: See TracChangeset for help on using the changeset viewer.