-
-
Notifications
You must be signed in to change notification settings - Fork 799
Open
Description
Context
Program is crashing when trying to print the value of a Maybe(ProcTypeAlias)
Odin: dev-2025-07:090cac62f
OS: Arch Linux, Linux 6.15.7-arch1-1
CPU: 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
RAM: 15682 MiB
Backend: LLVM 20.1.7
Expected Behavior
Should print the value
Current Behavior
Index out of range
Failure Information (for bugs)
Steps to Reproduce
package main
import "core:fmt"
MyProc :: #type proc()
main:: proc() {
maybe_proc: Maybe(MyProc) = nil // both nil or proc() {} seem to cause the issue
fmt.println(maybe_proc)
}
odin run .
Failure Logs
/usr/lib/odin/core/fmt/fmt.odin(2535:23) Index 4381444 is out of range 0..<1
fish: Job 1, 'odin run .' terminated by signal SIGILL (Illegal instruction)
Note
I noticed that this:
package main
import "core:fmt"
MyProc :: #type proc()
main:: proc() {
maybe_proc: Maybe(proc()) = nil
maybe_myproc: Maybe(MyProc) = nil
fmt.println(maybe_proc)
fmt.println(maybe_myproc)
}
prints just fine
nil
nil
Metadata
Metadata
Assignees
Labels
No labels