Skip to content

Using associated const initialized to __size_of::<V> causes compiler panic in type_check_analysis.rs #7615

@ironcev

Description

@ironcev

#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` value

We need to investigate why is the node_stack empty in add_edge_from_current. For details see #7619 (comment).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcompilerGeneral compiler. Should eventually become more specific as the issue is triaged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions