Opened 4 years ago

Closed 3 years ago

#63 closed defect (fixed)

Generic Struct Inside Declaration Results in "Too few type arguments"

Reported by: pabuhr Owned by:
Priority: minor Component: cfa-cc
Version: 1.0 Keywords:
Cc:

Description

union fred {
  forall(otype T) struct george {
    int i;
    T j;
  };
};

Results in:

CFA Version 1.0.0 (debug)
test.c:5:1 error: Too few type arguments in generic type instance of struct george with body 1

Notice that this error is on line 5 (the end of the struct definition). Even if you declare a field of type "george(int)" afterwards, the same error will occur:

union fred {
  forall(otype T) struct george {
    int i;
    T j;
  };
  george(int) g;
};

This will result in the same error.

(posted by Sunjay (s5varma) on behalf of pabuhr)

Change History (1)

comment:1 Changed 3 years ago by Rob Schluntz

Resolution: fixed
Status: newclosed

Fixed by 3d7e53b

Note: See TracTickets for help on using tickets.