Opened 4 years ago

Last modified 18 months ago

#8 closed defect

No reasonable alternative — at Version 1

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

Description (last modified by Rob Schluntz)

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

Change History (1)

comment:1 Changed 4 years ago by Rob Schluntz

Description: modified (diff)
Note: See TracTickets for help on using tickets.