○
Planned This feature is planned but not yet implemented.
In-file abstract/override pattern - needs restructuring to use cross-module imports.
Code
// Test 430_004: Abstract with Both Default AND Impl (Explicit Delegation)
// When an abstract event has BOTH a default and an override:
// - The override becomes the public handler
// - The default is renamed to `event.default`
// - Override EXPLICITLY calls `.default` to delegate
//
// This is the "wrap and extend" pattern with NO MAGIC!
~import std/io
// Define abstract event
~[abstract] tor process { name: string }
| result string
// Default implementation: just returns the name
~process => result { message: name }
// Override: EXPLICITLY calls process.default, then passes through
// Note: process.default - not process! No magic, no confusion.
~process = process.default(name) | result r => result { r.message }
// Test it
~process(name: "delegation works!")
| result r |> io.println(r.message)
Expected output
delegation works!
Flows
subflow ~process click a branch to expand · @labels scroll to their anchor
process.default (name)
flow ~process click a branch to expand · @labels scroll to their anchor
process (name: "delegation works!")