Skip to content

Commit 5f494f9

Browse files
committed
IntegerRangeType - test edgecase
1 parent d218134 commit 5f494f9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/PHPStan/Analyser/data/integer-range-types.php

+6
Original file line numberDiff line numberDiff line change
@@ -180,12 +180,18 @@ class X {
180180
*/
181181
public $error2;
182182

183+
/**
184+
* @var int<min, max>
185+
*/
186+
public $int;
187+
183188
public function supportsPhpdocIntegerRange() {
184189
assertType('int<0, 100>', $this->percentage);
185190
assertType('int<min, 100>', $this->min);
186191
assertType('int<0, max>', $this->max);
187192

188193
assertType('*ERROR*', $this->error1);
189194
assertType('*ERROR*', $this->error2);
195+
assertType('int', $this->int);
190196
}
191197
}

0 commit comments

Comments
 (0)