Check enum and struct representabilit properly (issues #3008 and #3779)
Add compile-fail tests for non-representable structs and enums