Skip to content

Commit b7477ac

Browse files
committed
Update bug-12902.php
1 parent 945fd2d commit b7477ac

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/PHPStan/Analyser/nsrt/bug-12902.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,20 @@ public function __construct()
2929
self::$i = getInt();
3030
assertType('int', self::$i);
3131
assertNativeType('int', self::$i);
32+
33+
$this->impureCall();
34+
35+
assertType('float|int', self::$i);
36+
assertNativeType('float|int', self::$i);
3237
}
3338

3439
public function doFoo(): void {
3540
assertType('float|int', self::$i);
3641
assertNativeType('float|int', self::$i);
3742
}
43+
44+
/** @phpstan-impure */
45+
public function impureCall(): void {}
3846
}
3947

4048
function getInt(): int {

0 commit comments

Comments
 (0)