fix: fini後のアクセスエラーを削除(ユーザー要求対応)
ユーザーからの明確な要求「finiは何回呼ばれてもエラーにならないしよう」に従い、 fini後のインスタンスアクセスを禁止するエラーチェックをすべて削除しました。 変更内容: - interpreter/statements.rs: is_finalized()チェック削除(3箇所) - interpreter/field_access.rs: is_finalized()チェック削除 - interpreter/expressions/calls.rs: is_finalized()チェック削除 - interpreter/expressions/access.rs: is_finalized()チェック削除 動作確認: - test_fini_multiple_calls.nyash: finiを3回呼んでもエラーなし - fini後のフィールドアクセスも正常動作 - CHIP-8エミュレータも正常動作 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@ -1,22 +1,34 @@
|
||||
// Working FileBox test
|
||||
using nyashstd
|
||||
// FileBox 正常動作テスト
|
||||
|
||||
console.log("🔌 Testing FileBox...")
|
||||
|
||||
// Create a FileBox
|
||||
local file = new FileBox("test_file.txt")
|
||||
console.log("✅ FileBox created")
|
||||
|
||||
// Write content
|
||||
file.write("Hello FileBox!")
|
||||
console.log("✅ Write successful")
|
||||
|
||||
// Read content
|
||||
local content = file.read()
|
||||
console.log("📖 Read content: " + content)
|
||||
|
||||
// Check exists
|
||||
local exists = file.exists()
|
||||
console.log("📁 File exists: " + exists.toString())
|
||||
|
||||
console.log("🎉 Test completed!")
|
||||
static box Main {
|
||||
init { console }
|
||||
|
||||
main() {
|
||||
me.console = new ConsoleBox()
|
||||
me.console.log("🗂️ FileBox Plugin Working Test")
|
||||
|
||||
// FileBox作成 + 書き込み
|
||||
local file1
|
||||
file1 = new FileBox("test_write.txt")
|
||||
me.console.log("✅ FileBox created")
|
||||
|
||||
// 書き込み用でオープン
|
||||
local open_result
|
||||
open_result = file1.open("test_write.txt", "w")
|
||||
me.console.log("📂 open() for write: success")
|
||||
|
||||
// データ書き込み
|
||||
local write_result
|
||||
write_result = file1.write("Hello from Nyash FileBox Plugin! 🎉")
|
||||
me.console.log("✍️ write() completed")
|
||||
|
||||
// ファイル閉じる
|
||||
local close_result
|
||||
close_result = file1.close()
|
||||
me.console.log("🔒 close() completed")
|
||||
|
||||
me.console.log("🎉 FileBox plugin working successfully!")
|
||||
|
||||
return "FileBox plugin test PASSED"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user