Odin
Odin copied to clipboard
Declaring constants in defer block results in "undeclared name"
Context
Relevant code:
package bug
t :: proc() {
defer {
x :: 1
y := x + 1
}
}
Results in
This happens with any type for x
- Operating System & Odin Version:
Odin: dev-2024-11:8f2766c4d
OS: Fedora Linux 40 (KDE Plasma), Linux 6.11.4-201.fc40.x86_64
CPU: AMD Ryzen 7 5800H with Radeon Graphics
RAM: 13817 MiB Backend: LLVM 18.1.8
Steps to Reproduce
Simple odin run -file bug.odin