// issue 0155 — indexing a pointer-to-scalar (`pc[0]` where `pc: *i64`) panics // the compiler at LLVM emission instead of either lowering `pc[i]` like C // (`*(pc + i)`) or emitting a clean diagnostic that `*T` is not indexable. // // Observed: `thread … panic: unresolved type reached LLVM emission` // at src/backend/llvm/types.zig:196 (the `.unresolved` arm of // toLLVMTypeInfo), reached via emitIndexGet // (src/backend/llvm/ops.zig ~1988) → the index expression's element // type resolves to `.unresolved` and is never diagnosed. // Expected: either a working scalar-pointer index (`pc[0]` == `pc.*`) or a // proper "cannot index a *T; use a slice / deref with .*" diagnostic. // A `.unresolved` reaching LLVM is always a compiler bug. #import "modules/std.sx"; main :: () -> i64 { x : i64 = 5; pc : *i64 = @x; return pc[0]; // panics the compiler }