fix: Fix NyashParser import path and improve BoxCall fallback

- Fix NyashParser import path in vm.rs tests
- Improve BoxCall fallback logic for plugin/builtin methods
- Add proper function existence checks before lowering to Call

This ensures plugin Box methods correctly fall back to BoxCall
when the corresponding user-defined function doesn't exist.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Moe Charm
2025-08-20 23:07:16 +09:00
parent 64167def8f
commit af32896574
2 changed files with 36 additions and 32 deletions

View File

@ -1072,7 +1072,7 @@ impl Default for VM {
mod tests {
use super::*;
use crate::mir::{MirModule, MirFunction, FunctionSignature, MirType, EffectMask, BasicBlock};
use crate::NyashParser;
use crate::parser::NyashParser;
use crate::runtime::NyashRuntime;
use crate::core::model::BoxDeclaration as CoreBoxDecl;
use crate::interpreter::SharedState;