Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Names of redefined intrinsics seem to be not getting exported #2007

Open
fabiansperber opened this issue Sep 1, 2022 · 0 comments
Open

Names of redefined intrinsics seem to be not getting exported #2007

fabiansperber opened this issue Sep 1, 2022 · 0 comments
Labels
replicated We were able to replicate the bug.

Comments

@fabiansperber
Copy link
Contributor

I am getting an error trying to call an intrinsic proc in the global scope that's is assigned a new name in the imported lib.
Expected it to work similar to a normal function.

import "core:sys/windows"
CLASSNAME := windows.L("ApplicationWindowClass") // error: 'L' is not exported by 'windows'

add :: proc(a, b: int) -> int { return a + b }
c := add(3, 4) // works
// Note: this proc could also be in a separate lib and the call prefixed with that lib's name and it still works

Related is the following error when trying to access the same exported name without the library name with using the lib:

dummy :: proc() {
    CLASSNAME = windows.L("ApplicationWindowClass") // ok
    using windows
    CLASSNAME = L("ApplicationWindowClass") // error: Undeclared name: L
}

odin report

Odin: dev-2022-08:1f622579
OS: Windows 10 Professional (version: 21H2), build 19044.1889
CPU: Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz
RAM: 16332 MiB

@github-actions github-actions bot added the stale label Dec 30, 2022
@Kelimion Kelimion added replicated We were able to replicate the bug. and removed stale labels Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
replicated We were able to replicate the bug.
Projects
None yet
Development

No branches or pull requests

2 participants