Skip to content

Commit

Permalink
Regression test
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Feb 28, 2022
1 parent 9e42896 commit f6c62a0
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/PHPStan/Analyser/NodeScopeResolverTest.php
Expand Up @@ -731,6 +731,7 @@ public function dataFileAsserts(): iterable

if (PHP_VERSION_ID >= 80100) {
yield from $this->gatherAssertTypes(__DIR__ . '/data/bug-6695.php');
yield from $this->gatherAssertTypes(__DIR__ . '/data/bug-6433.php');
}

yield from $this->gatherAssertTypes(__DIR__ . '/data/bug-6698.php');
Expand Down
21 changes: 21 additions & 0 deletions tests/PHPStan/Analyser/data/bug-6433.php
@@ -0,0 +1,21 @@
<?php // lint >= 8.1

namespace Bug6433;

use Ds\Set;
use function PHPStan\Testing\assertType;

enum E: string {
case A = 'A';
case B = 'B';
}

class Foo
{

function x(): void {
assertType('Ds\Set<Bug6433\E>', new Set([E::A, E::B]));
}

}

0 comments on commit f6c62a0

Please sign in to comment.