refactor(mir): Phase 139-P3-B - RoutingDecision を enum 対応 + レガシー削除
- RoutingDecision の missing_caps を Vec<CapabilityTag> に変更(型安全化) - error_tags は to_tag() メソッドで自動生成 - 全 callsite を enum variant に修正 - capability_tags モジュール(文字列定数群)を完全削除 - 全テスト PASS(型安全性向上を確認) - フォーマット適用
This commit is contained in:
@ -63,7 +63,8 @@ pub fn ensure(builder: &mut MirBuilder, v: ValueId, kind: LocalKind) -> ValueId
|
||||
let mut slot_name_opt: Option<String> = None;
|
||||
|
||||
let names_for_v: Vec<String> = builder
|
||||
.variable_ctx.variable_map
|
||||
.variable_ctx
|
||||
.variable_map
|
||||
.iter()
|
||||
.filter(|(k, &vid)| vid == v && k.starts_with("__pin$"))
|
||||
.map(|(k, _)| k.clone())
|
||||
@ -116,13 +117,17 @@ pub fn ensure(builder: &mut MirBuilder, v: ValueId, kind: LocalKind) -> ValueId
|
||||
builder.type_ctx.value_types.insert(loc, t);
|
||||
}
|
||||
if let Some(cls) = builder.type_ctx.value_origin_newbox.get(&v).cloned() {
|
||||
builder.type_ctx.value_origin_newbox.insert(loc, cls.clone());
|
||||
builder
|
||||
.type_ctx
|
||||
.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.type_ctx.value_types.get(&loc).is_none() {
|
||||
builder
|
||||
.type_ctx.value_types
|
||||
.type_ctx
|
||||
.value_types
|
||||
.insert(loc, crate::mir::MirType::Box(cls));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user