Opened 7 years ago
Closed 7 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: | |
Cc: |
Description
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; bar(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.
Note: See
TracTickets for help on using
tickets.
In 1dcd52a3: