You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 3af229c
Browse filesBrowse the repository at this point in the historyBrowse files
Type a closure's gathered return from parameters resolved by its siblings
The closure type gathered for template inference was read with the raw
acceptor parameter, so its body saw T unresolved, while the body walk
afterwards used the resolved T. In map([1, 2], fn ($x) => $x + 1) the
result was list<float|int>, and in pipe2(1, fn ($x) => [$x], fn ($y) => $y)
the template T leaked into the result.
The gathered closure now sees the templates the already gathered
siblings determine. A template that also occurs in a non-covariant
position of the parameter, such as an accumulator in callable(T, int): T,
is fed by the closure's own return and stays unresolved.
Amp-Thread-ID: https://ampcode.com/threads/T-01a17eac-1199-74a6-b3f7-dfbd8a084465
0 commit comments