Open vudaltsov opened 2 weeks ago
The following code:
interface I { public string $x { get; } } enum E implements I { }
Resulted in this output:
PHP Fatal error: Enum E must implement 1 abstract private method (I::$x::get)
But I expected this output instead:
PHP Fatal error: Enum E cannot implement interfaces with properties
PHP 8.4.0-dev (cli) (built: Sep 24 2024 14:38:59) (NTS)
MacOS
By the way, why I::$x::get is called "private" in the error?
I::$x::get
"private" was fixed in master but not 8.4, see #15995 I'll work on a patch for better enum error messages
Description
The following code:
Resulted in this output:
But I expected this output instead:
PHP Version
PHP 8.4.0-dev (cli) (built: Sep 24 2024 14:38:59) (NTS)
Operating System
MacOS