-
Notifications
You must be signed in to change notification settings - Fork 426
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix false issue when passing enum case to generic class
Fixes #10484
- Loading branch information
Emil Masiakowski
committed
Feb 21, 2024
1 parent
d0b1cf6
commit 32d939f
Showing
3 changed files
with
40 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
namespace Bug10484; | ||
|
||
enum Foo { | ||
case Bar; | ||
} | ||
|
||
class Test { | ||
/** | ||
* @param \Ds\Set<Foo> $foos | ||
*/ | ||
public function bar(\Ds\Set $foos): void | ||
{ | ||
} | ||
|
||
public function test(): void | ||
{ | ||
$this->bar(new \Ds\Set([Foo::Bar])); | ||
} | ||
} |