Files
hakorune/tests/development/test_simple_chain_error.nyash
Moe Charm ef7a0de3b0 feat: Prepare for code modularization and cleanup
- Archive old documentation and test files to `docs/archive/` and `local_tests/`.
- Remove various temporary and old files from the project root.
- Add `nekocode-rust` analysis tool and its output files (`nekocode/`, `.nekocode_sessions/`, `analysis.json`).
- Minor updates to `apps/chip8_nyash/chip8_emulator.nyash` and `local_tests` files.

This commit cleans up the repository and sets the stage for further code modularization efforts, particularly in the `src/interpreter` and `src/parser` modules, based on recent analysis.
2025-08-16 01:30:39 +09:00

37 lines
944 B
Plaintext

# 簡単な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()) # ❌ ここでエラー発生!