Opened 8 years ago
Last modified 5 years ago
#8 closed defect
No reasonable alternative — at Initial Version
Reported by: | pabuhr | Owned by: | |
---|---|---|---|
Priority: | major | Component: | cfa-cc |
Version: | 1.0 | Keywords: | Resolver |
Cc: |
Description
forall( otype T | { void ?{}( T *, zero_t ); T ?+?( T, T ); } )
T sum( int n, T a[] ) {
T total = (T){0}; instantiate T, select 0
for ( int i = 0; i < n; i += 1 )
total = total + a[i]; select +
return total;
}
int mmain() {
int a[3];
int i;
i = sum( 3, a );
}
cfa test10.c
CFA Version 1.0.0 (debug)
test10.c:12 error: No reasonable alternatives for expression Applying untyped:
Name: sum
...to:
constant expression (3: signed int)
Name: a
Note:
See TracTickets
for help on using tickets.