Files
hakorune/apps/tests/minimal_usingcollector_collect.hako
nyash-codex c344451087 fix(mir-builder): static method arity mismatch根治 - Phase 25.x
**問題**:
- ParserStmtBox.parse_using/4 に5引数が渡される
- me.method呼び出しで instance/static 判別なし
- static method に誤って receiver 追加

**修正**:
- MeCallPolicyBox: params[0]の型で instance/static 判別
- Instance method: receiver 追加
- Static method: receiver なし
- Arity検証(NYASH_ME_CALL_ARITY_STRICT=1)

**ドキュメント**:
- docs/reference/environment-variables.md 新規作成
- docs/development/architecture/mir-logs-observability.md 更新

**テスト**:
- src/tests/mir_stage1_cli_emit_program_min.rs 追加
- 既存 stage1 テスト全てパス

Phase: 25.x
2025-11-21 11:16:38 +09:00

20 lines
830 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// minimal_usingcollector_collect.hako
// 目的: UsingCollectorBox.collect の SSA/PHI バグを最小構成で再現するテスト入力。
// - Stage1 CLI が読む `apps/tests/stage1_using_minimal.hako` と同形の 1 行 using を含む。
// - Rust 側では NyashParser → MirCompiler → VM 実行時に
// UsingCollectorBox.collect/1 の substring まわりで Undefined Value が発生していないかを観測する。
using lang.compiler.parser.using.using_collector_box as UsingCollectorBox
static box Main {
main() {
// Stage1 using minimal と同じ形の 1 行 using。
// UsingCollectorBox.collect はこの文字列を line-scan して JSON を返す。
local src = "using \"foo/bar.hako\" as Foo\n"
local json = UsingCollectorBox.collect(src)
print(json)
return 0
}
}