Initial implementation of struct-type contract generation.

Currently errors on all reflective access to struct types.