Using associated const initialized to `__size_of::<V>` causes compiler panic in `type_check_analysis.rs`
Author: ironcevCreated Apr 30, 2026Updated Sep 14, 2026
Labelsbugcompiler
#7614 implements dynamic storage based StorageVec<V>. The implementation, found in storage_vec.sw, would ideally use an associated const initialized to:
const STORES_STORAGE_TYPE: bool = __size_of::<V>() == 0;That line is currently commented out, because it causes compiler to panic:
thread 'main' (35636) panicked at sway-core/src/semantic_analysis/type_check_analysis.rs:64:44:
called `Option::unwrap()` on a `None` valueWe need to investigate why is the node_stack empty in add_edge_from_current. For details see https://github.com/FuelLabs/sway/pull/7619#issuecomment-4364177935.
Source: FuelLabs/sway