Reference › Errors
E-ONTRANSITION-NO-TARGET
<onTransition> has neither to= nor from=.
What it means
An <onTransition> handler needs a trigger. to= fires on the outgoing edge into the named variant; from= fires on the incoming edge out of it. With neither attribute the handler is attached to no edge at all and can never run — dead code the compiler surfaces rather than emits.
Minimal reproducer
This is the exact source compiled against the linked compiler and verified to produce E-ONTRANSITION-NO-TARGET.
<program title="p">
type Phase:enum = { Idle, Busy }
function ping() { return 1 }
<engine for=Phase initial=.Idle>
<Idle rule=(.Busy)>
<onTransition>ping()</>
</>
<Busy rule=(.Idle)>busy</>
</>
</>
How to fix
-
Add
to=.Variantfor the outgoing transition. Runs as the machine leaves this state for the named one. -
Add
from=.Variantfor the incoming transition. Runs as the machine enters this state from the named one.
Related
Specification
Normative text: §51.0.H, §55.15, §34. Spec lives at compiler/SPEC.md .