Skip to content

fix: int ranges compatible with refined-int pseudo-types (#170)#221

Merged
calebdw merged 1 commit into
mainfrom
calebdw/push-xqlvqlxmsmtz
Jul 10, 2026
Merged

fix: int ranges compatible with refined-int pseudo-types (#170)#221
calebdw merged 1 commit into
mainfrom
calebdw/push-xqlvqlxmsmtz

Conversation

@calebdw

@calebdw calebdw commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

int<0,max> passed to a non-negative-int parameter no longer triggers a false type_mismatch_argument diagnostic.

Added comprehensive subtype relationships between IntRange types and refined-int pseudo-types:

  • IntRange <: refined-int (int<0,max> <: non-negative-int)
  • refined-int <: IntRange (positive-int <: int<0,max>)
  • IntRange <: IntRange (int<1,50> <: int<0,100>)
  • refined-int <: refined-int (positive-int <: non-negative-int)

Fixes #170.

@codecov-commenter

codecov-commenter commented Jul 10, 2026

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 97.89474% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/php_type.rs 97.89% 4 Missing ⚠️

📢 Thoughts on this report? Let us know!

int<0,max> passed to a non-negative-int parameter no longer triggers
a false type_mismatch_argument diagnostic.

Added comprehensive subtype relationships between IntRange types and
refined-int pseudo-types:
- IntRange <: refined-int (int<0,max> <: non-negative-int)
- refined-int <: IntRange (positive-int <: int<0,max>)
- IntRange <: IntRange (int<1,50> <: int<0,100>)
- refined-int <: refined-int (positive-int <: non-negative-int)

Fixes #170.
@calebdw calebdw force-pushed the calebdw/push-xqlvqlxmsmtz branch from b03524a to 0959b9f Compare July 10, 2026 16:35
@calebdw calebdw merged commit e501c6d into main Jul 10, 2026
7 checks passed
@calebdw calebdw deleted the calebdw/push-xqlvqlxmsmtz branch July 10, 2026 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

False type_mismatch_argument for int<0..max> passed to non-negative-int

2 participants