Odin icon indicating copy to clipboard operation
Odin copied to clipboard

Compiler crash in specific use of #type

Open EeroMutka opened this issue 3 years ago • 1 comments
trafficstars

The following code crashes the compiler silently:

package main
import "core:fmt"

main :: proc() {
	foo: typeid
	if foo == #type proc([]any) -> any {
		fmt.println("hello")
	}
}

Additionally, the following code crashes the compiler, but gives the following error in the llvm backend:

package main
import "core:fmt"

main :: proc() {
	foo: typeid
	bar := foo == #type proc([]any) -> any
	fmt.println("hello")
}
c:\dev\odin\src\llvm_backend_general.cpp(1352): Assertion Failure: `type != t_invalid`

Odin: dev-2021-11:5db505c4 OS: Windows 10 Professional (version: 21H1), build 19043.1348 CPU: Intel(R) Core(TM) i5-4460 CPU @ 3.20GHz RAM: 16303 MiB

EeroMutka avatar Nov 29 '21 23:11 EeroMutka

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..

github-actions[bot] avatar Jul 24 '22 22:07 github-actions[bot]