feat(lifecycle): Phase 83 P3-D MethodReturnHintBox implementation

ChatGPT Pro設計に基づき、既知メソッド戻り値型推論箱(P3-D)を実装。

## 変更内容

- method_return_hint.rs: MethodReturnHintBox 新規作成
  - BoxCall/Call のメソッド名から戻り値型を推論
  - TypeAnnotationBox と同等のマッピングを適用
  - length/size/len → Integer, push → Void, str/substring → String
- lifecycle.rs: P3-D 経路を P3-C の前に挿入
- mod.rs: method_return_hint モジュール登録

## 成果

- Case D 削減: 20 → 16 (4件削減, 20%)
- Unit tests: 5/5 passed

## 設計原則

- 単一責務: P3-D 推論のみ
- TypeAnnotationBox 薄ラップ: 型マッピングの SSOT は TypeAnnotationBox
- 将来移行性: MethodRegistry 導入時も API 不変

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
nyash-codex
2025-12-02 18:09:04 +09:00
parent ce60ebc439
commit 8ae1eabcfa
3 changed files with 243 additions and 0 deletions

View File

@ -21,6 +21,7 @@ pub mod funcscanner_append_defs;
pub mod funcscanner_trim;
pub mod generic_case_a;
pub mod generic_type_resolver; // Phase 66: P3-C ジェネリック型推論箱
pub mod method_return_hint; // Phase 83: P3-D 既知メソッド戻り値型推論箱
pub mod if_dry_runner; // Phase 33-10.0
pub mod if_merge; // Phase 33-7
pub mod if_phi_context; // Phase 61-1