hacspec
hacspec copied to clipboard
Named option types - None - identifier is not a constant
The following results in a name resolution error
use hacspec_lib::*;
pub type MySingleOptionType = Option<U32>;
pub fn bar() {
MySingleOptionType::None;
}
the type being
error[Hacspec]: identifier is not a constant
--> language-tests/option.rs:19:9
|
19 | MySingleOptionType::None;
| ^^^^^^^^^^^^^^^^^^^^^^^^
A similar issue occurs if you do not use hacspec_lib::*; for
pub fn bar() {
Option::<u32>::None;
}