poke-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: assert() inside type x = struct { ...


From: Jose E. Marchesi
Subject: Re: assert() inside type x = struct { ...
Date: Fri, 08 Apr 2022 17:12:24 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> Is it intentional that assert() does not work inside type definitions like 
> this?
>
> type foo = struct { string yo; };
> type x = struct {
>   uint<8> len;
>   union {
>     foo myfoo;
>     byte[len] unknown;
>   } payload;
>   assert(payload'size'magnitude/8 == len);
> };

Statements inside struct types are not supported, no.
Only declarations.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]