Hello.
I'm using PHP Tools for VSCode (v1.53).
There seems to be a bug with type inference and templates. See code as follows:
<?php
/**
* @template T
* @return T
*/
function f(mixed $x): mixed
{
return $x;
}
$x = f(3);
// The below line produces the following warning:
// Cannot implicitly convert 'T' to 'string'PHP(PHP0410)
// (local variable) T $x
echo "= $x";