Skip to content

Conversation

@JukkaL
Copy link
Collaborator

@JukkaL JukkaL commented Jan 28, 2026

Check that item type is valid, and infer i64 as the type of len(<vec>). vec types only support specific simple item types that are quick to type check at runtime.

Related issue: mypyc/mypyc#840

Add basic type checking support for the vec[T] type from mypyc.librt.vecs:
- Register vec as a special form in semanal.py
- Add type analysis for vec with item type validation
- Add plugin support for vec in default.py
- Add test cases for vec type checking
@github-actions
Copy link
Contributor

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

@JukkaL JukkaL merged commit 8a1ebf3 into master Jan 28, 2026
23 checks passed
@JukkaL JukkaL deleted the mypy-vec-changes branch January 28, 2026 16:57
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