Skip to content

Commit 7790471

Browse files
committed
1 parent 360c096 commit 7790471

2 files changed

Lines changed: 40 additions & 0 deletions

File tree

‎tests/PHPStan/Analyser/AnalyserIntegrationTest.php‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1903,6 +1903,12 @@ public function testBug15754(): void
19031903
$this->assertSame(23, $errors[1]->getLine());
19041904
}
19051905

1906+
public function testBug10660(): void
1907+
{
1908+
$errors = $this->runAnalyse(__DIR__ . '/data/bug-10660.php');
1909+
$this->assertNoErrors($errors);
1910+
}
1911+
19061912
public function testReflectionMethodOfClassStringOfNonExistentClass(): void
19071913
{
19081914
$errors = $this->runAnalyse(__DIR__ . '/data/reflection-method-of-class-string-of-non-existent-class.php');
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?php
2+
3+
namespace Bug10660;
4+
5+
class Flags1
6+
{
7+
public const A = 1;
8+
}
9+
10+
class Flags2
11+
{
12+
public const A = 1;
13+
public const B = 2;
14+
}
15+
16+
class Flags3
17+
{
18+
public const A = 1;
19+
public const B = 4;
20+
}
21+
22+
interface MyInterface
23+
{
24+
/**
25+
* @template TFlags1 of int-mask-of<Flags1::*>
26+
* @template TFlags2 of int-mask-of<Flags2::*>
27+
* @template TFlags3 of int-mask-of<Flags3::*>
28+
*
29+
* @param TFlags1 $flags1
30+
* @param TFlags2 $flags2
31+
* @param TFlags3 $flags3
32+
*/
33+
public function doSomething(int $flags1, int $flags2, int $flags3): void;
34+
}

0 commit comments

Comments
 (0)