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.
19 lines
508 B
Plaintext
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
|