phase: 20.49 COMPLETE; 20.50 Flow+String minimal reps; 20.51 selfhost v0/v1 minimal (Option A/B); hv1-inline binop/unop/copy; docs + run_all + CURRENT_TASK -> 21.0

This commit is contained in:
nyash-codex
2025-11-06 15:41:52 +09:00
parent 2dc370223d
commit 77d4fd72b3
1658 changed files with 6288 additions and 2612 deletions

View File

@ -0,0 +1,37 @@
# 簡単な3段階継承チェーンエラー再現
# 1段階目: ビルトインBox
# StringBox (内蔵)
# 2段階目: ユーザー定義Box
box MiddleBox from StringBox {
init { middle_data }
birth(content) {
from StringBox.birth(content)
me.middle_data = "middle"
}
override toString() {
return "Middle: " + from StringBox.toString()
}
}
# 3段階目: ユーザー定義Box (ここでエラー!)
box TopBox from MiddleBox {
init { top_data }
birth(content) {
from MiddleBox.birth(content)
me.top_data = "top"
}
override toString() {
# ここでエラー: TopBox は StringBox に直接 from していない
return "Top: " + from MiddleBox.toString() # この中で StringBox.toString() が呼ばれる
}
}
# エラーが出る実行
local top = new TopBox("test")
print(top.toString()) # ❌ ここでエラー発生!