Files
mgmt/lang/interpret_test/TestAstFunc3/send-recv-1.txtar
James Shubin 8ea7d4cf84 engine: graph, util: Restore send/recv behaviour
A regression in 4b0cdf9123 caused the
basic send/recv functionality to break for simple scenarios. This was
due to inadequate testing, and a partial misunderstanding of the
situation.

New testing should hopefully catch more cases, but send/recv and
compile-time checks are still not as complete as is probably possible.
2024-01-31 22:59:58 -05:00

19 lines
508 B
Plaintext

-- main.mcl --
test "send" {
sendvalue => "this is hello", # sends on key of `hello`
# we also secret send on key of `answer` the int value of 42
Meta:autogroup => false,
}
test "recv" {
expectrecv => ["anotherstr",], # expecting to recv on these keys!
Meta:autogroup => false,
}
# must error, incompatible types
Test["send"].answer -> Test["recv"].anotherstr
-- OUTPUT --
# err: errUnify: cannot send/recv from test[send].answer to test[recv].anotherstr: field kind mismatch between int and string