Open ironcev opened 2 weeks ago
When an associated constant is initialized to a const-eval associated function like in the below example, compiler panics with:
thread 'main' panicked at sway-core/src/semantic_analysis/type_check_analysis.rs:64:44: called `Option::unwrap()` on a `None` value
library; struct S {} impl S { fn bar() -> u8 { 0 } } impl S { const S_ASSOC: u8 = Self::bar(); }
Panicking is also there if it is initialized with S::bar().
S::bar()
When fixing this issue, adjust the associated_const_in_decls_of_other_constants test which is linked to this issue via GitHub link in the test TODO.
associated_const_in_decls_of_other_constants
When an associated constant is initialized to a const-eval associated function like in the below example, compiler panics with:
Panicking is also there if it is initialized with
S::bar()
.When fixing this issue, adjust the
associated_const_in_decls_of_other_constants
test which is linked to this issue via GitHub link in the test TODO.