fix: MIR builder me resolution for static box methods

- Fixed me ValueId inconsistency in static box methods
- Previously, each me reference generated a new const __me__ ValueId
- Now caches the first me ValueId in variable_map for reuse
- This ensures RefSet and RefGet operate on the same object
- ArrayBox get/set/push now working correctly in VM mode
- Test results: 1, 42, 3 (as expected)

🔧 Technical Details:
- build_me_expression() now stores fallback ValueId in variable_map
- Subsequent me references reuse the same ValueId
- VM BoxCall debug logs confirm ArrayBox methods dispatch correctly

Co-Authored-By: ChatGPT5
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Moe Charm
2025-08-23 21:13:02 +09:00
parent fffbac9aac
commit 2949648e71
10 changed files with 350 additions and 52 deletions

View File

@ -720,6 +720,7 @@ impl Display for ErrorBox {
}
/// Result values in Nyash - represents success or error results
#[deprecated(note = "Use boxes::result::NyashResultBox (aka boxes::ResultBox) instead")]
#[derive(Debug)]
pub struct ResultBox {
pub is_success: bool,