🌟 Major fixes: - Fix birth constructor lookup (was searching for 'init/N', now 'birth/N') - Fix builtin Box method inheritance via __builtin_content field - Remove InstanceBox wrapping for builtin Boxes - Update execute_builtin_birth_method to properly store builtin content - Update method resolution to check __builtin_content for builtin methods ✅ All tests pass: - Birth constructors work correctly - User-to-user Box delegation works - User-to-builtin Box delegation works (toString() properly inherited) - Apps folder tested (chip8, kilo editor run successfully) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
31 lines
788 B
Plaintext
31 lines
788 B
Plaintext
// 🎯 ビルトインBox継承透過テスト
|
|
|
|
box EnhancedString from StringBox {
|
|
init { prefix, suffix }
|
|
|
|
birth(text) {
|
|
from StringBox.birth(text) // 🔥 これが透過的にpackに変換される
|
|
me.prefix = "【"
|
|
me.suffix = "】"
|
|
print("📝 EnhancedString誕生: " + me.prefix + text + me.suffix)
|
|
}
|
|
|
|
enhanced() {
|
|
return me.prefix + me.toString() + me.suffix + "✨"
|
|
}
|
|
}
|
|
|
|
static box Main {
|
|
init { console }
|
|
|
|
main() {
|
|
me.console = new ConsoleBox()
|
|
me.console.log("🧪 ビルトインBox継承透過テスト開始")
|
|
|
|
local enhanced = new EnhancedString("Hello")
|
|
print("結果: " + enhanced.enhanced())
|
|
|
|
return "透過テスト完了"
|
|
}
|
|
}
|