Opened 7 years ago
Last modified 4 years ago
#8 closed defect
No reasonable alternative — at Version 3
Reported by: | pabuhr | Owned by: | |
---|---|---|---|
Priority: | major | Component: | cfa-cc |
Version: | 1.0 | Keywords: | Resolver |
Cc: |
Description (last modified by )
forall( otype T | { void ?{}( T &, zero_t ); T ?+?( T, T ); } ) T sum( int n, T a[] ) { T total = 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
Change History (3)
comment:1 Changed 7 years ago by
Description: | modified (diff) |
---|
comment:2 Changed 7 years ago by
Note: See
TracTickets for help on using
tickets.
This appears to be related to #3 and #4, as adding these fixes it: