17 lines
518 B
Plaintext
17 lines
518 B
Plaintext
;;;; A handled condition's sentence does not linger for the next stop: a bad
|
|
;;;; index is caught through Error, then a set on a slot the class does not
|
|
;;;; declare traps, and the break must carry that trap's own sentence.
|
|
(import agent "vendor:agent")
|
|
|
|
(defclass point [x y])
|
|
|
|
(defonce grid [3 i32])
|
|
(defonce far i32 4)
|
|
|
|
(defn main [] i32
|
|
(agent/start "/tmp/flan-dev-trap-stale-sentence-fallback.sock")
|
|
(println (handler-case (at grid far) [(Error [_e] -1)]))
|
|
(let [p (point 1 2)]
|
|
(set (get p :z) 1))
|
|
0)
|