vx-lang / vx-lang/Vx

Fix: Add proper mapping rollback for generic unification in TypeChecker

Open
#145 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug core-lang
Dominant language
Rust
Stars
14
Forks
2
Avg merge
12h 42m
Merged PRs (30d)
61

Description

During type checking, if generic type unification fails midway through mapping arguments, the TypeChecker currently leaks the partial mappings into the environment. This pollutes the generic scope for subsequent trait resolution or generic calls. We need to implement a snapshot/rollback mechanism for generic_mappings so that failed unification attempts leave no side effects.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the TypeChecker implementation and inspect how generic_mappings are updated during generic type unification. Trace a failing midway mapping attempt, then verify that the environment is unchanged afterward and that subsequent trait resolution or generic calls no longer see partial mappings.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.