Skip to content

Commit 7b79884

Browse files
committed
Regression test
Closes phpstan/phpstan#5446
1 parent b2b8690 commit 7b79884

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

tests/PHPStan/Rules/Generics/ClassTemplateTypeRuleTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,4 +102,9 @@ public function testNestedGenericTypes(): void
102102
]);
103103
}
104104

105+
public function testBug5446(): void
106+
{
107+
$this->analyse([__DIR__ . '/data/bug-5446.php'], []);
108+
}
109+
105110
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?php
2+
3+
namespace Bug5446;
4+
5+
/** @template T */
6+
class A {}
7+
/** @template T */
8+
class B {}
9+
/** @template T */
10+
class C {}
11+
/**
12+
* @template S
13+
* @template T
14+
*/
15+
class D {}
16+
17+
namespace barBug5446;
18+
19+
/**
20+
* @template First of \Bug5446\A
21+
* @template Second of \Bug5446\B
22+
* @template Third of \Bug5446\C<Second>
23+
* @template Fourth of \Bug5446\D<First, Third>
24+
*/
25+
class X {}

0 commit comments

Comments
 (0)