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:
24
examples/lisp/test_cons_minimal.hako
Normal file
24
examples/lisp/test_cons_minimal.hako
Normal file
@ -0,0 +1,24 @@
|
||||
// 最小限のConsBoxテスト
|
||||
|
||||
box ConsBox {
|
||||
car
|
||||
cdr
|
||||
|
||||
init {
|
||||
car, cdr
|
||||
}
|
||||
}
|
||||
|
||||
// 空のConsBoxを作成
|
||||
print("Creating empty ConsBox...")
|
||||
cons1 = new ConsBox()
|
||||
print("Created!")
|
||||
|
||||
// フィールドに値を設定
|
||||
cons1.car = 42
|
||||
cons1.cdr = "hello"
|
||||
|
||||
print("car: " + cons1.car)
|
||||
print("cdr: " + cons1.cdr)
|
||||
|
||||
print("✅ Test completed!")
|
||||
Reference in New Issue
Block a user