When an associated constant is recursively initialized to a const-eval module function like in the below example, instead of emitting an error, 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 {}
fn mod_fn() -> u8 {
S::S_ASSOC
}
impl S {
const S_ASSOC: u8 = mod_fn();
}
When fixing this issue, enable and adjust the recursive_const_associated_over_module_function test which is linked to this issue via GitHub link in the test TODO.
When an associated constant is recursively initialized to a const-eval module function like in the below example, instead of emitting an error, compiler panics with:
When fixing this issue, enable and adjust the
recursive_const_associated_over_module_function
test which is linked to this issue via GitHub link in the test TODO.