**問題**: - 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
20 lines
830 B
Plaintext
20 lines
830 B
Plaintext
// minimal_usingcollector_collect.hako
|
||
// 目的: UsingCollectorBox.collect の SSA/PHI バグを最小構成で再現するテスト入力。
|
||
// - Stage‑1 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() {
|
||
// Stage‑1 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
|
||
}
|
||
}
|
||
|