Skip to content

Commit ae15b31

Browse files
Add non regression test for 13267
1 parent 985c791 commit ae15b31

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

tests/PHPStan/Rules/Methods/CallMethodsRuleTest.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3646,6 +3646,16 @@ public function testBug5642(): void
36463646
]);
36473647
}
36483648

3649+
public function testBug13267(): void
3650+
{
3651+
$this->checkThisOnly = false;
3652+
$this->checkNullables = false;
3653+
$this->checkUnionTypes = true;
3654+
$this->checkExplicitMixed = false;
3655+
3656+
$this->analyse([__DIR__ . '/data/bug-13267.php'], []);
3657+
}
3658+
36493659
public function testBug3396(): void
36503660
{
36513661
$this->checkThisOnly = false;
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php declare(strict_types = 1);
2+
3+
namespace Bug13267;
4+
5+
class ExampleException extends \ErrorException {
6+
public function __construct(\Throwable $e) {
7+
parent::__construct(
8+
$e->getMessage(),
9+
$e->getCode(),
10+
1,
11+
$e->getFile(),
12+
$e->getLine(),
13+
$e->getPrevious(),
14+
);
15+
}
16+
}

0 commit comments

Comments
 (0)