[BUG] _type_is_eq ignores parametric origins
Open
Nobody has claimed this yet.
auto_priority_triaged
bug
modular-repo
mojo
- Dominant language
- Mojo
- Stars
- 29.8k
- Forks
- 3.2k
- PR merge metrics
- No merged PRs in 30d
Description
Bug description
Parametric origins does not affect the result of _type_is_eq.
Fixing this would make it possible to compare origins.
Steps to reproduce
struct Foo[origin: Origin]:
...
fn main() raises:
var a = 1
var b = 2
print(_type_is_eq[Foo[__origin_of(a)], Foo[__origin_of(b)]]()) # prints True
System information
Magic version: 0.7.2
System
------------
Pixi version: 0.41.4
Platform: linux-64
Virtual packages: __unix=0=0
: __linux=5.15.0=0
: __glibc=2.35=0
: __cuda=12.8=0
: __archspec=1=skylake
Cache dir: /root/.cache/rattler/cache
Auth storage: /root/.rattler/credentials.json
Config locations: No config files found
Global
------------
Bin dir: /root/.modular/bin
Environment dir: /root/.modular/envs
Manifest dir: /root/.modular/manifests/pixi-global.toml
Project
------------
Name: caspar_mojo
Version: 0.1.0
Manifest file: /workspaces/caspar_mojo/mojoproject.toml
Last updated: 06-06-2025 21:06:23
Environments
------------
Environment: default
Features: default
Channels: https://conda.modular.com/max-nightly, https://conda.modular.com/max, https://repo.prefix.dev/modular-community, conda-forge
Dependency count: 1
Dependencies: max
Target platforms: linux-64
Package Version Build Size Kind Source
max 25.4.0.dev2025060513 release 9.2 KiB conda max
max-core 25.4.0.dev2025060513 release 212.5 MiB conda max-core
max-python 25.4.0.dev2025060513 release 14.6 MiB conda max-python
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.