Odin
Odin copied to clipboard
Panic from invalid usage of label identifier
Context
Odin: dev-2021-12:c771ea97 OS: Windows 10 Home Basic (version: 20H2), build 19042.1237 CPU: Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz RAM: 8055 MiB
Expected Behavior
Compiler does not panic.
Current Behavior
Compiler panics with message "C:\odin\src\llvm_backend_general.cpp(2409): Panic: nullptr value for expression from identifier: .outer (2caa5001c60) : invalid type @ 2caf246a8a0"
Failure Information (for bugs)
Invalid usage of a label identifier causes the panic.
Steps to Reproduce
I was attempting the following to put the defer in an outer scope.
package main
main :: proc() {
vals : [10][]int
outer : for v, idx in vals {
row := make([]int, 5)
vals[idx] = row
defer delete(row) outer
}
}
Failure Logs
Please include any relevant log snippets or files here.
Hello!
I am marking this issue as stale as it has not received any engagement from the community or maintainers 120 days. That does not imply that the issue has no merit! If you feel strongly about this issue
- open a PR referencing and resolving the issue;
- leave a comment on it and discuss ideas how you could contribute towards resolving it;
- leave a comment and describe in detail why this issue is critical for your use case;
- open a new issue with updated details and a plan on resolving the issue.
The motivation for this automation is to help prioritize issues in the backlog and not ignore, reject, or belittle anyone..