-
Notifications
You must be signed in to change notification settings - Fork 651
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
Cannot process colon without parent #6309
Comments
I found these snippets: https://psalm.dev/r/d76feed5ec<?php
declare(strict_types=1);
/**
* @template T
*/
class Set
{
/** @var array<string, T> */
private array $values = [];
/**
* @param array<string, T> $values
*/
public function intersect(array $values): array
{
$intersectedValues = [];
foreach ($this->values as $value) {
if (\in_array($value, $values, true)) {
$intersectedValues[] = $value;
}
}
return $intersectedValues;
}
}
|
@supersmile2009 it appears we're trying to parse the assertion string "in-array-T:Set as mixed". I think templates should have a special handling for in_array. Can you check if you can tweak your PR? For reference: #6233 |
weirdan
added a commit
to weirdan/psalm
that referenced
this issue
Aug 15, 2021
weirdan
added a commit
to weirdan/psalm
that referenced
this issue
Aug 15, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This broke with as of 4.9.3, and was working properly in 4.9.2.
https://psalm.dev/r/d76feed5ec
The text was updated successfully, but these errors were encountered: