PHPantom version
phpantom_lsp 0.8.0-dirty
Installation method
Pre-built binary from GitHub Releases
Operating system
Linux x86_64
Editor
Neovim
Bug description
Directly chained method calls do not change the context.
phpantom thinks method call 2 has signature of first method call.
-> Expected 2 arguments, got 1 phpantom (argument_count_mismatch) [12, 34]
-> inlay hints show $a instead of $c (in the example)
Steps to reproduce
- Create this file:
<?php
declare(strict_types=1);
function makeCallable(string $a, string $b): callable
{
return fn (string $c) => "$a $b $c";
}
function main()
{
return makeCallable('1', '2')('test');
}
- Trigger linting
- Should give inlay hint $c for 'test' but is $a
- Should not give argument_count_mismatch
Error output or panic trace
.phpantom.toml
Additional context
No response
PHPantom version
phpantom_lsp 0.8.0-dirty
Installation method
Pre-built binary from GitHub Releases
Operating system
Linux x86_64
Editor
Neovim
Bug description
Directly chained method calls do not change the context.
phpantom thinks method call 2 has signature of first method call.
-> Expected 2 arguments, got 1 phpantom (argument_count_mismatch) [12, 34]
-> inlay hints show $a instead of $c (in the example)
Steps to reproduce
Error output or panic trace
.phpantom.toml
Additional context
No response