wip(mir): StaticCompiler receiver正規化の部分的修正 - 将来の根治に向けた基盤整備
【修正内容】
1. src/mir/builder/calls/guard.rs
- receiver型情報がない場合のpass-through処理追加
- ME-CALL として後段処理に委譲
2. src/mir/builder/ssa/local.rs
- receiver kind で型情報がない場合、origin から型を推論
- value_types への伝播を強化
【現状】
- 完全な根治には至っていない(MIR builder設計レベルの複雑な依存関係)
- .hako側workaround (51d53c29) が実用的な解決策として機能中
【根本原因】
- value_origin_newbox に ParserBox が保持される
- value_types に実際の型(String等)が欠落
- receiver に型情報がないまま StaticCompiler Method に解決される問題
【今後の方向性】
- MIR builder の型伝播システム全体の見直しが必要
- Phase 25.1: Stage-1 bridge receiver bug (partial fix)
This commit is contained in:
@ -116,7 +116,13 @@ pub fn ensure(builder: &mut MirBuilder, v: ValueId, kind: LocalKind) -> ValueId
|
||||
builder.value_types.insert(loc, t);
|
||||
}
|
||||
if let Some(cls) = builder.value_origin_newbox.get(&v).cloned() {
|
||||
builder.value_origin_newbox.insert(loc, cls);
|
||||
builder.value_origin_newbox.insert(loc, cls.clone());
|
||||
|
||||
// CRITICAL FIX: For receiver kind, if type is missing but origin exists,
|
||||
// infer MirType::Box from origin
|
||||
if kind == LocalKind::Recv && builder.value_types.get(&loc).is_none() {
|
||||
builder.value_types.insert(loc, crate::mir::MirType::Box(cls));
|
||||
}
|
||||
}
|
||||
builder.local_ssa_map.insert(key, loc);
|
||||
loc
|
||||
|
||||
Reference in New Issue
Block a user