New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Forbid @template
annotation on closures
#5472
Comments
I found these snippets: https://psalm.dev/r/93bb04856b<?php
$f =
/**
* @template T
* @param T $t
* @return T
*/
fn($t) => $t;
$f(42);
|
Expected: |
weirdan
added a commit
to weirdan/psalm
that referenced
this issue
Mar 29, 2021
They don't work properly anyway. Fixes vimeo#5472
weirdan
added a commit
to weirdan/psalm
that referenced
this issue
Mar 29, 2021
They don't work properly anyway. Fixes vimeo#5472
muglug
pushed a commit
that referenced
this issue
Mar 29, 2021
They don't work properly anyway. Fixes #5472
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Originally posted by @muglug in #5471 (comment)
It's currently accepted, but does not produce a useful generic: https://psalm.dev/r/93bb04856b. It would be better to reject it outright.
The text was updated successfully, but these errors were encountered: