Skip to content

Conversation

@JukkaL
Copy link
Collaborator

@JukkaL JukkaL commented Nov 25, 2025

Previously int argument values didn't match if a primitive parameter type was u8, for example, requiring generic operations to be used, or an explicit u8 conversion/cast/type annotation.

Now we perform a second matching pass with relaxed subtyping rules that allow int to match with any native int type if strict matching didn't produce a result. As an optimization, only perform this if any primitives use native integer types (most don't).

Previously `int` argument values didn't match if a primitive parameter
type was `u8`, for example, requiring generic operations to be used,
or an explicit `u8` conversion/cast/type annotation.

Now we perform a second matching pass with relaxed subtyping rules that
allow `int` to match with any native int type if strict matching didn't
produce a result. As an optimization, only perform this if any
primitives use native integer types (most don't).
@JukkaL JukkaL merged commit 1f09855 into master Nov 26, 2025
14 checks passed
@JukkaL JukkaL deleted the mypyc-prim-native-int branch November 26, 2025 13:20
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.

3 participants