Opened 4 years ago

Closed 4 years ago

#23 closed defect (fixed)

Function call syntax not working

Reported by: pabuhr Owned by: Rob Schluntz <rschlunt@…>
Priority: major Component: cfa-cc
Version: 1.0 Keywords:
Cc:

Description

If you can declare a function operator on a pointer type, you should be able
to call it with the natural syntax.

However this fails:

forall(otype T | { int ?()(T *); })
void foo(T * f) {
    int x = f();
}

cfa test.c
CFA Version 1.0.0 (debug)
test.c:75 error: No reasonable alternatives for expression Applying untyped: 
  Name: f
...to: 

but this does not fail:

forall(otype T | { int ?()(T); })
void foo(T f) {
    int x = f();
}

Change History (1)

comment:1 Changed 4 years ago by Rob Schluntz <rschlunt@…>

Owner: set to Rob Schluntz <rschlunt@…>
Resolution: fixed
Status: newclosed

In 6ccfb7f:

Unconditionally attempt to resolve function operators with function alternative [fixes #23]

Note: See TracTickets for help on using tickets.