-
Notifications
You must be signed in to change notification settings - Fork 460
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not report missing implementation abstract method from trait when …
…it's implicitly implemented by enum
- Loading branch information
1 parent
1cba4ba
commit c50b71f
Showing
5 changed files
with
119 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<?php // lint >= 8.1 | ||
|
||
namespace Bug11592; | ||
|
||
trait HelloWorld | ||
{ | ||
abstract public static function cases(): array; | ||
|
||
abstract public static function from(): self; | ||
|
||
abstract public static function tryFrom(): ?self; | ||
} | ||
|
||
enum Test | ||
{ | ||
use HelloWorld; | ||
} | ||
|
||
enum Test2 | ||
{ | ||
|
||
abstract public static function cases(): array; | ||
|
||
abstract public static function from(): self; | ||
|
||
abstract public static function tryFrom(): ?self; | ||
|
||
} | ||
|
||
enum BackedTest: int | ||
{ | ||
use HelloWorld; | ||
} | ||
|
||
enum BackedTest2: int | ||
{ | ||
abstract public static function cases(): array; | ||
|
||
abstract public static function from(): self; | ||
|
||
abstract public static function tryFrom(): ?self; | ||
} | ||
|
||
enum EnumWithAbstractMethod | ||
{ | ||
abstract function foo(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters