Fixed with: https://github.com/MoarVM/MoarVM/commit/688796b434 https://github.com/rakudo/rakudo/commit/a92f092ac5
The error message now reads: $ perl6 -e 'class Foo is repr<CStruct> { has Buf $.a }' ===SORRY!=== Error while compiling -e CStruct representation only handles attributes of type: (u)int8, (u)int16, (u)int32, (u)int64, (u)long, (u)longlong, num16, num32, (s)size_t, bool, Str and types with representation: CArray, CPointer, CStruct, CPPStruct and CUnion at -e:1