Skip to content

Commit ad610cf

Browse files
committed
Test for crash (php-8-stubs mentioning enum in functions map)
1 parent 85a895e commit ad610cf

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

tests/PHPStan/Analyser/AnalyserIntegrationTest.php

+6
Original file line numberDiff line numberDiff line change
@@ -1495,6 +1495,12 @@ public function testBug11913(): void
14951495
$this->assertNoErrors($errors);
14961496
}
14971497

1498+
public function testBug12549(): void
1499+
{
1500+
$errors = $this->runAnalyse(__DIR__ . '/data/bug-12549.php');
1501+
$this->assertNoErrors($errors);
1502+
}
1503+
14981504
/**
14991505
* @param string[]|null $allAnalysedFiles
15001506
* @return Error[]
+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?php
2+
3+
namespace Bug12549;
4+
5+
class Foo
6+
{
7+
public const string OPTION_ROUNDING_MODE = 'roundingMode';
8+
9+
public function setRoundingMode(): void
10+
{
11+
$this->bar(self::OPTION_ROUNDING_MODE);
12+
}
13+
14+
private function bar(string $v): void
15+
{
16+
}
17+
}

0 commit comments

Comments
 (0)