Odin icon indicating copy to clipboard operation
Odin copied to clipboard

Calling NS.MakeConstantString trigger assert failure

Open hasenj opened this issue 3 years ago • 0 comments

Context

Odin: dev-2022-08:3469178dc
OS:   macOS 12.0.5 Monterey
CPU:  ARM64
RAM:  8192 MiB

Expected Behavior

I expect to be able to call NS.MakeConstantString("something") to get an NSString instance at the package scope.

Current Behavior

The following assertion failure happens:

src/llvm_backend_proc.cpp(73): Assertion Failure: `entity->flags & EntityFlag_ProcBodyChecked` MakeConstantString :: proc "cdecl" (cstring) -> ^String
Trace/BPT trap: 5

Steps to Reproduce

In any odin file, have a line like this and it would trigger the error

kCFRunLoopDefaultMode := NS.AT("kCFRunLoopDefaultMode")

Note: AT is an alias for MakeConstantString

hasenj avatar Aug 25 '22 18:08 hasenj