c3lang / c3c

Compiler for the C3 language
https://c3-lang.org
GNU Lesser General Public License v3.0
3.03k stars 183 forks source link

LLVM ERROR: Unsupported expression in static initializer #1586

Closed fernandolguevara closed 1 month ago

fernandolguevara commented 1 month ago
module boom;
enum Boom: int (String a) {
    BOOM = {0}
}
module app;
import std::io, boom;
fn void! main(String[] args) {
    io::printn(boom::Boom.BOOM);
}

output:

LLVM ERROR: Unsupported expression in static initializer: %28
[1]    41565 abort      c3c run
lerno commented 1 month ago

This was caused due to the introspection being triggered in a local scope. It should be fixed now.

fernandolguevara commented 1 month ago

Thanks, It's working now!