PHPantom version
phpantom_lsp 0.8.0-86-gefdc9ae4
Installation method
Built from source
Operating system
macOS aarch64 (Apple Silicon)
Editor
VS Code
Bug description
The following code generates a compile error, which isn't detected and not warned about.
Fatal error: Declaration of Bar::foo(): ?Bar must be compatible with Foo::foo(): ?static in php-wasm run script on line 11
Steps to reproduce
<?php
class Foo {
public static function foo(): ?static
{
return new static();
}
}
class Bar extends Foo {
public static function foo(): ?self // wrong should be ?static but phpantom doesn't detect this
{
return new self();
}
}
Error output or panic trace
.phpantom.toml
Additional context
No response
PHPantom version
phpantom_lsp 0.8.0-86-gefdc9ae4
Installation method
Built from source
Operating system
macOS aarch64 (Apple Silicon)
Editor
VS Code
Bug description
The following code generates a compile error, which isn't detected and not warned about.
Fatal error: Declaration of Bar::foo(): ?Bar must be compatible with Foo::foo(): ?static in php-wasm run script on line 11Steps to reproduce
Error output or panic trace
.phpantom.toml
Additional context
No response