add some missing "when" closures

This commit is contained in:
Vern Paxson 2022-05-12 13:39:26 -07:00
parent 025b9b1534
commit 8928aa57e7
6 changed files with 11 additions and 11 deletions

View file

@ -10,7 +10,7 @@ global result_count = 0;
function print_keys(a: opaque of Broker::Store)
{
when ( local s = Broker::keys(a) )
when [a] ( local s = Broker::keys(a) )
{
print "keys", s;
++result_count;

View file

@ -12,7 +12,7 @@ global step: count = 0;
function print_index(k: any)
{
when ( local r = Broker::get(h, k) )
when [k] ( local r = Broker::get(h, k) )
{
step += 1;
print fmt("[%d]", step), k, r$status, r$result;
@ -26,7 +26,7 @@ function print_index(k: any)
function print_exists(k: any)
{
when ( local r = Broker::exists(h, k) )
when [k] ( local r = Broker::exists(h, k) )
{
step += 1;
print fmt("[%d]", step), k, r;
@ -40,7 +40,7 @@ function print_exists(k: any)
function print_index_from_value(k: any, i: any)
{
when ( local r = Broker::get_index_from_value(h, k, i) )
when [k, i] ( local r = Broker::get_index_from_value(h, k, i) )
{
step += 1;
print fmt("[%d]", step), k, r$status, r$result;

View file

@ -12,7 +12,7 @@ global h: opaque of Broker::Store;
function print_index(k: any)
{
when ( local r = Broker::get(h, k) )
when [k] ( local r = Broker::get(h, k) )
{
print k, r$status, r$result;
}