Odin
Odin copied to clipboard
`using windows` doesn't work with `windows.L`
Context
Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.
Odin: dev-2024-05:2250eb3e7
OS: Windows 11 Professional (version: 23H2), build 22631.3447
CPU: 12th Gen Intel(R) Core(TM) i9-12900H
RAM: 65219 MiB
Backend: LLVM 17.0.1
Expected Behavior
Program compiles as is.
Current Behavior
Program only compiles with test2 proc commented out.
Failure Information (for bugs)
Steps to Reproduce
Please provide detailed steps for reproducing the issue.
package main
import "core:sys/windows"
main :: proc() {
test1()
test2()
}
test1 :: proc() {
test := windows.L("test") // compiles fine
}
test2 :: proc() {
using windows
test := L("test") // Error: Undeclared name: L
}
Failure Logs
Please include any relevant log snippets or files here.
just curious what happen if you alias "core:sys/windows" e.g. import win32 "core:sys/windows" ?
just curious what happen if you alias "core:sys/windows" e.g.
import win32 "core:sys/windows"?
It doesn't change anything.
I don't have a Windows machine to test this with, but I was able to recreate the same issue on Linux by aliasing L in a subpackage to a couple different procs in intrinsics (i.e. trap, count_ones).
Seems to be something with how the compiler is interpreting intrinsic proc aliases.