E1134: invalid representation declaration
meta repr(C) asserts that a struct has the layout of a C struct (ADR-0097).
meta repr(C) asserts that a struct has the layout of a C struct (ADR-0097).
The compiler checks the assertion. A generic struct is rejected, because its
layout depends on parameters. A struct with an erg, abs or ins field is
rejected, because these fields carry ownership state, which C has no word for.
The message names the declaration and the reason.
The same code is reported when a VolatileAddress[T] names a type that is not
declared meta volatile. The message then names the target type and says that
it must be declared meta volatile.
Example
Fix
Declare a concrete struct with plain value fields. A volatile target also
carries meta volatile.
Run actus explain E1134 in your terminal to read this entry offline. Browse Modules & rules or all error codes.