Open kururen opened 2 years ago
This might be the same bug, with fresh Odin on Linux:
package nocrash
MaybeLike :: union($T: typeid) { T }
ok :: proc() -> MaybeLike(int) { return 1 }
bad :: proc() -> Maybe(int) { return 1 }
The above does not crash.
The below does crash:
package crash
bad :: proc() -> Maybe(int) { return 1 }
Crash:
$ odin doc hello.odin -file -doc-format
src/docs_writer.cpp(263): Assertion Failure: `file_index_found != nullptr`
Illegal instruction (core dumped)
Still an issue, please open.
Struct :: struct { texture: raylib.Texture2D }
is another example that'll lead to the bug.
Context
When creating an alias for an imported struct and running
odin doc -doc-format
(doesn't matter whether it's a directory or a single file) it crashes with the following message:Expected Behavior
The odin-doc files are generated.
Current Behavior
Crashes the compiler
Steps to Reproduce
Minimal example:
Note that it also happens with non-polymorphic structs (e.g. anything from raylib, which is where I ran into the bug). For context, the odin installation is in C:\odin
I could reproduce the same behaviour on MacOS as well, with the same version 2022-04.