Skip to content

Commit

Permalink
Return Type<int> in types::intMask() due to possibly overflowing …
Browse files Browse the repository at this point in the history
…bitmasks
  • Loading branch information
vudaltsov committed Aug 5, 2024
1 parent a27f873 commit 2b5f6e6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/Type/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed

- Drop needless `$type` parameter PHPDoc types in `TypeVisitor`.
- Return `Type<int>` in `types::intMask()` due to possibly overflowing bitmasks.

## [0.4.1] 2024-08-05

Expand Down
2 changes: 1 addition & 1 deletion src/Type/Internal/IntMaskType.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/**
* @internal
* @psalm-internal Typhoon\Type
* @implements Type<positive-int>
* @implements Type<int>
*/
final class IntMaskType implements Type
{
Expand Down
2 changes: 1 addition & 1 deletion src/Type/types.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public static function intRange(int|Type $min = self::PHP_INT_MIN, int|Type $max
* @no-named-arguments
* @param positive-int $value
* @param positive-int ...$values
* @return Type<positive-int>
* @return Type<int>
*/
public static function intMask(int $value, int ...$values): Type
{
Expand Down

0 comments on commit 2b5f6e6

Please sign in to comment.