-
Notifications
You must be signed in to change notification settings - Fork 494
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for property fetch in initializers
- Loading branch information
1 parent
e4a6d20
commit 53c643d
Showing
4 changed files
with
48 additions
and
0 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,23 @@ | ||
<?php // lint >= 8.2 | ||
|
||
namespace Bug8957; | ||
|
||
use function PHPStan\Testing\assertType; | ||
|
||
enum A: string | ||
{ | ||
case X = 'x'; | ||
case Y = 'y'; | ||
} | ||
|
||
class B { | ||
public const A = [ | ||
A::X->value, | ||
A::Y->value, | ||
]; | ||
|
||
public function doFoo(): void | ||
{ | ||
assertType('array{\'x\', \'y\'}', self::A); | ||
} | ||
} |