poke-devel
[Top][All Lists]
Advanced

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

[BUG] Misleading error message in 'unit' declarations


From: apache2
Subject: [BUG] Misleading error message in 'unit' declarations
Date: Fri, 8 Jul 2022 13:11:55 +0200
User-agent: Mutt/1.9.3 (2018-01-21)

This error messag makes sense to me, it's saying that units must be defined 
with constant ints:
#!!# var x = 4096; unit PAGE_SIZE = x;
<stdin>:1:32: error: expected constant integral value for unit
var x = 4096; unit PAGE_SIZE = x;;
                               ^
I think it should say the same when trying to define a 'unit' from an offset 
(because casting to integral would still not work, since it needs to be 
constant):
#!!# var x = 4096#B; unit PAGE_SIZE = x;
<stdin>:1:34: error: invalid cast to integral
var x = 4096#B; unit PAGE_SIZE = x;;
                                 ^




reply via email to

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