You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
VersionConstraint.intersection can throw TypeError in some cases #2608
I investigated this and confirmed the TypeError occurs because VersionConstraint.intersection() casts every result of intersect() to VersionRange, while intersections can return _EmptyVersion, Version, or VersionUnion.
I’m thinking of changing the local variable to VersionConstraint, returning early when the result is empty, and adding tests for disjoint ranges and single-version intersections.
Would this approach be acceptable?
Activity
agam1092005 commentedon Sep 30, 2026
I investigated this and confirmed the TypeError occurs because VersionConstraint.intersection() casts every result of intersect() to VersionRange, while intersections can return _EmptyVersion, Version, or VersionUnion.
I’m thinking of changing the local variable to VersionConstraint, returning early when the result is empty, and adding tests for disjoint ranges and single-version intersections.
Would this approach be acceptable?
@ardera @lrhn