Skip to content

Commit 8cc1a93

Browse files
Add numeric-string test
1 parent a4894b8 commit 8cc1a93

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/PHPStan/Analyser/data/bug-8803.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,15 @@ public function sayHello(): void
1212
for ($offset = 1; $offset <= 14; $offset++) {
1313
$value = $from->format('N') + $offset;
1414
$value2 = $offset + $from->format('N');
15+
$value3 = '1e3' + $offset;
16+
$value4 = $offset + '1e3';
1517

1618
assertType("'1'|'2'|'3'|'4'|'5'|'6'|'7'", $from->format('N'));
1719
assertType('int<1, 14>', $offset);
1820
assertType('int<2, 21>', $value);
1921
assertType('int<2, 21>', $value2);
22+
assertType('float', $value3);
23+
assertType('float', $value4);
2024
}
2125
}
2226

0 commit comments

Comments
 (0)