Skip to content

Commit 307176a

Browse files
committed
Regression test
Closes phpstan/phpstan#8473
1 parent fc5515a commit 307176a

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

tests/PHPStan/Rules/Generics/ClassAncestorsRuleTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,4 +232,9 @@ public function testScalarClassName(): void
232232
$this->analyse([__DIR__ . '/data/scalar-class-name.php'], []);
233233
}
234234

235+
public function testBug8473(): void
236+
{
237+
$this->analyse([__DIR__ . '/data/bug-8473.php'], []);
238+
}
239+
235240
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?php
2+
3+
namespace Bug8473;
4+
5+
/**
6+
* @template TKey of int
7+
* @template TValue
8+
* @psalm-type PagesType = object{
9+
* test: int,
10+
* }
11+
*/
12+
class Paginator
13+
{
14+
15+
}
16+
17+
/** @extends Paginator<int, AccountEntity> */
18+
class AccountCollection extends Paginator
19+
{
20+
}
21+
22+
class AccountEntity
23+
{}

0 commit comments

Comments
 (0)