Closed FriedrichGretz closed 3 years ago
This is not a bug - its a feature by design:
const
s can be evaluated at compile time - e. g. extern const
These considerations lead to the decision to make signature generation purely syntactic, not taking into account typing and constant evaluation.
Describe the bug This code
fails to compile with the error message that B (and A) is less accessible than C. However
const
expressions can be evaluated at compile time and so only the value 64 needs to be written to the signature not how it is calculated in the module.Expected behaviour Above code should compile without errors.
Additional context Currently,
const
in Blech declares a compile time constant (aka#define
) in C. If that changes due to complex types than the issue above might become more intricate.