Opened 7 years ago

Closed 6 years ago

#48 closed defect (fixed)

ttype assertion resolution is too strict

Reported by: Rob Schluntz Owned by: Rob Schluntz
Priority: major Component: cfa-cc
Version: 1.0 Keywords:


Assertions on ttype variables are currently too strict with regards to qualifiers.

forall(ttype T | { void foo(T); }) void bar(T x);
void foo(int);

int main() {
  const int x;

T binds to [int], and there is no void foo(const int) in scope. Notably, using dtype instead of ttype works in the above example, so it is not a general assertion inference problem.

Adding void foo(const int); or casting (int)x are temporary workarounds.

Change History (1)

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

Resolution: fixed
Status: assignedclosed

In 1dcd52a3:

Disregard outermost const, volatile, _Atomic qualifiers on parameters when unifying function types [fixes #48]

Note: See TracTickets for help on using tickets.