diff --git a/tests/PHPStan/Rules/Comparison/NumberComparisonOperatorsConstantConditionRuleTest.php b/tests/PHPStan/Rules/Comparison/NumberComparisonOperatorsConstantConditionRuleTest.php index ae47818512..4d89a240be 100644 --- a/tests/PHPStan/Rules/Comparison/NumberComparisonOperatorsConstantConditionRuleTest.php +++ b/tests/PHPStan/Rules/Comparison/NumberComparisonOperatorsConstantConditionRuleTest.php @@ -231,4 +231,10 @@ public function testBug6467(): void $this->analyse([__DIR__ . '/data/bug-6467.php'], []); } + public function testBug6642(): void + { + $this->treatPhpDocTypesAsCertain = true; + $this->analyse([__DIR__ . '/data/bug-6642.php'], []); + } + } diff --git a/tests/PHPStan/Rules/Comparison/data/bug-6642.php b/tests/PHPStan/Rules/Comparison/data/bug-6642.php new file mode 100644 index 0000000000..b8ae395d17 --- /dev/null +++ b/tests/PHPStan/Rules/Comparison/data/bug-6642.php @@ -0,0 +1,10 @@ +