Closed ChinaMoli closed 2 days ago
Describe the bug Calling a static method of type class-string<Foo> in strict mode will prompt Expected type 'string|object'. Found 'class-string<Foo>'
class-string<Foo>
Expected type 'string|object'. Found 'class-string<Foo>'
To Reproduce
<?php declare(strict_types=1); class Foo { public static function Bar() { return 'bar'; } } $foo = Foo::class; var_dump($foo::Bar()); // bar
Expected behavior There should be no errors.
Screenshots
Platform and version OS: Windows 10 WSL2 Intelephense version: v1.11.0 (pre-release)
Windows 10 WSL2
v1.11.0 (pre-release)
Describe the bug Calling a static method of type
class-string<Foo>
in strict mode will promptExpected type 'string|object'. Found 'class-string<Foo>'
To Reproduce
Expected behavior There should be no errors.
Screenshots![PixPin_2024-06-29_17-10-52](https://github.com/bmewburn/vscode-intelephense/assets/39550254/dd1f5553-8958-41d9-8510-93cca0b97c0a)
Platform and version OS:
Windows 10 WSL2
Intelephense version:v1.11.0 (pre-release)