engine, lang: Improve send/recv significantly

Part of this was rotten, and not fully functional. This fixes the rot,
adds some tests, and improves the type checking that occurs when sending
and receiving values. In addition, a significant portion of this happens
at compile time.

There is still more work to be done here, but this should get us a good
chunk of the way for now.
This commit is contained in:
James Shubin
2019-03-09 16:19:24 -05:00
parent aa6b701b77
commit de43569fa2
12 changed files with 148 additions and 14 deletions

View File

@@ -33,7 +33,7 @@ type Sendable struct {
// Sends returns a struct containing the defaults of the type we send. This
// needs to be implemented (overridden) by the struct with the Sendable trait to
// be able to send any values. The public struct field names are the keys used.
// be able to send any values. The field struct tag names are the keys used.
func (obj *Sendable) Sends() interface{} {
return nil
}