Files
hakorune/local_tests/test_birth_with_method.hako

20 lines
336 B
Plaintext

box LifeBox {
init { name }
birth(lifeName) {
me.name = lifeName
print("birth called with: " + lifeName)
}
getInfo() {
return me.name
}
}
static box Main {
main() {
local obj = new LifeBox("Alice")
print("Result: " + obj.getInfo())
return "done"
}
}