Skip to content
Playground(another site)

bynk.history.not_an_agent

Error A for all run: History[T] names a T that is not an agent — only an agent has handlers to sequence and reachable states to observe (testing track slice 7, ADR 0155).

for all run: History[T] generates a run of calls to an agent's handlers and drives them against a fresh instance. Only an agent has handlers to sequence, so T must be one declared in scope. For a value, a plain for all x: T generates the value. Name the agent.

Example

tests/t.test.bynk
for all run: History[Amount] { … } // ✗ `Amount` is a value type
for all run: History[Wallet] { … } // ✓ an agent

In the Book

See also

  • Every code in its category, History properties, on the diagnostic index.
  • bynk explain bynk.history.not_an_agent shows the same from the installed toolchain, without a network.