Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Tests/Attributes.c

    r55ba7339 r68cd1ce  
    66//    @max
    77//
    8 // 2. a direct application to a manifest otype
     8// 2. a direct application to a manifest type
    99//
    1010//    @max( int )
    1111//
    12 // 3. constraining a otype variable; the application is implicitly performed at the call site as in (2)
     12// 3. constraining a type variable; the application is implicitly performed at the call site as in (2)
    1313//
    14 //    forall( otype T | { T @max( T ); } ) T x( T t );
     14//    forall( type T | { T @max( T ); } ) T x( T t );
    1515//
    1616//
     
    2323//    x = (*attr_var);
    2424//
    25 // 2. an indirect application to a manifest otype
     25// 2. an indirect application to a manifest type
    2626//
    2727//    (*attr_var)( int )
    2828//
    29 // 3. a direct application to a otype variable
     29// 3. a direct application to a type variable
    3030//
    3131//    @max( T )
     
    4747// 3. polymorphic
    4848//
    49 //    forall( otype T | constraint( T ) ) int @attr( T );
     49//    forall( type T | constraint( T ) ) int @attr( T );
    5050
    5151int @max = 3;
     
    5353int main() {
    5454    int x;
    55     otype @otype(otype t);                                                                      // compiler intrinsic
    56     otype @widest(otype t);
    57     @otype(x) *y;                                                                               // gcc: otypeof(x) *y;
    58     const @widest(double) *w;                                                   // gcc: const otypeof(x) *w;
    59     * @otype(3 + 4) z;                                                                  // cfa declaration syntax
     55    type @type(type t);                                                                 // compiler intrinsic
     56    type @widest(type t);
     57    @type(x) *y;                                                                                // gcc: typeof(x) *y;
     58    const @widest(double) *w;                                                   // gcc: const typeof(x) *w;
     59    * @type(3 + 4) z;                                                                   // cfa declaration syntax
    6060    y = @max;           
    6161    z = @max(x) + @size(int);
Note: See TracChangeset for help on using the changeset viewer.