@@ -48,12 +48,16 @@ public function specifiers(int $i) {
48
48
/**
49
49
* @param positive-int $posInt
50
50
* @param negative-int $negInt
51
+ * @param int<1, 5> $nonZeroIntRange
52
+ * @param int<-1, 5> $intRange
51
53
*/
52
- public function positionalArgs ($ mixed , int $ i , float $ f , string $ s , int $ posInt , int $ negInt ) {
54
+ public function positionalArgs ($ mixed , int $ i , float $ f , string $ s , int $ posInt , int $ negInt, int $ nonZeroIntRange , int $ intRange ) {
53
55
// https://3v4l.org/vVL0c
54
56
assertType ('numeric-string ' , sprintf ('%2$14s ' , $ mixed , $ i ));
55
57
assertType ('non-falsy-string&numeric-string ' , sprintf ('%2$14s ' , $ mixed , $ posInt ));
56
58
assertType ('non-falsy-string&numeric-string ' , sprintf ('%2$14s ' , $ mixed , $ negInt ));
59
+ assertType ('non-falsy-string ' , sprintf ('%2$14s ' , $ mixed , $ intRange )); // could be numeric-string
60
+ assertType ('non-falsy-string ' , sprintf ('%2$14s ' , $ mixed , $ nonZeroIntRange )); // could be non-falsy-string&numeric-string
57
61
58
62
assertType ('numeric-string ' , sprintf ('%2$.14F ' , $ mixed , $ i ));
59
63
assertType ('numeric-string ' , sprintf ('%2$.14F ' , $ mixed , $ f ));
0 commit comments