-
Notifications
You must be signed in to change notification settings - Fork 474
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dda95b4
commit 3adc91d
Showing
4 changed files
with
68 additions
and
22 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,30 @@ | ||
<?php | ||
|
||
namespace Bug8983; | ||
|
||
use function PHPStan\Testing\assertType; | ||
|
||
enum Enum1: string | ||
{ | ||
|
||
case FOO = 'foo'; | ||
|
||
} | ||
|
||
enum Enum2: string | ||
{ | ||
|
||
case BAR = 'bar'; | ||
|
||
} | ||
|
||
class Foo | ||
{ | ||
|
||
/** @param value-of<Enum1|Enum2> $bar */ | ||
public function doFoo($bar): void | ||
{ | ||
assertType("'bar'|'foo'", $bar); | ||
} | ||
|
||
} |