Skip to content
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

resource is a reserved word #2618

Closed
SignpostMarv opened this issue Jan 14, 2020 · 1 comment
Closed

resource is a reserved word #2618

SignpostMarv opened this issue Jan 14, 2020 · 1 comment
Labels

Comments

@SignpostMarv
Copy link
Contributor

when used indirectly (i.e. as a list member), resource is falsely identified as a reserved word.

false positive: https://psalm.dev/r/1463bb7cbe
no errors as expected: https://psalm.dev/r/afac31458f

May or may not be related to #1644

@psalm-github-bot
Copy link

I found these snippets:

https://psalm.dev/r/1463bb7cbe
<?php
/** @param list<scalar|array|object|resource|null> $_s */
function foo(array $_s) : void { }
Psalm output (using commit 887a635):

ERROR: ReservedWord - 2:12 - 'resource' is a reserved word
https://psalm.dev/r/afac31458f
<?php
/** @param array{0:resource} $_s */
function foo(array $_s) : void { }
Psalm output (using commit 887a635):

No issues!

bapcltd-marv added a commit to bapcltd/php-imap that referenced this issue Jan 14, 2020
@muglug muglug added the bug label Jan 15, 2020
@muglug muglug closed this as completed in 389af1b Jan 15, 2020
bapcltd-marv added a commit to bapcltd/php-imap that referenced this issue Jan 15, 2020
bapcltd-marv added a commit to bapcltd/php-imap that referenced this issue Jan 15, 2020
bapcltd-marv added a commit to bapcltd/php-imap that referenced this issue Jan 15, 2020
bapcltd-marv added a commit to bapcltd/php-imap that referenced this issue Jan 15, 2020
bapcltd-marv added a commit to bapcltd/php-imap that referenced this issue Jan 15, 2020
bapcltd-marv added a commit to bapcltd/php-imap that referenced this issue Jan 15, 2020
bapcltd-marv added a commit to bapcltd/php-imap that referenced this issue Jan 15, 2020
bapcltd-marv added a commit to bapcltd/php-imap that referenced this issue Jan 15, 2020
bapcltd-marv added a commit to bapcltd/php-imap that referenced this issue Jan 15, 2020
markovlatkovic added a commit to markovlatkovic/php-imap that referenced this issue May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants