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

Psalm fails to get type with: @param + generics + non-ASCII parameter name #11290

Open
rarila opened this issue Feb 16, 2025 · 1 comment
Open
Labels

Comments

@rarila
Copy link
Contributor

rarila commented Feb 16, 2025

No problem with non-generics or @var

https://psalm.dev/r/6912e403b0

Copy link

I found these snippets:

https://psalm.dev/r/6912e403b0
<?php

/**
 * @param bool         $foo
 * @param bool         $föö
 * @param list<string> $bar
 * @param list<string> $bär
 */
function test(bool $foo, bool $föö, array $bar, array $bär): void 
{
    /** @psalm-trace $foo */;	// <- works
    /** @psalm-trace $föö */;	// <- works
    /** @psalm-trace $bar */;	// <- works
    /** @psalm-trace $bär */;	// <- fails
}

/** @var list<string> $bär*/
$bär = [];
/** @psalm-trace $bär */;	// <- works
Psalm output (using commit dae5a05):

INFO: Trace - 11:29 - $foo: bool

INFO: Trace - 12:31 - $föö: bool

INFO: Trace - 13:29 - $bar: list<string>

INFO: Trace - 14:30 - $bär: array<array-key, mixed>

INFO: Trace - 19:26 - $bär: list<string>

@orklah orklah added the bug label Feb 16, 2025
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