Skip to content

Aliasing an alias of a procedure group doesn't work across files #2075

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

Open
IanLilleyT opened this issue Sep 23, 2022 · 0 comments
Open

Aliasing an alias of a procedure group doesn't work across files #2075

IanLilleyT opened this issue Sep 23, 2022 · 0 comments
Labels

Comments

@IanLilleyT
Copy link
Contributor

Summary

Expecting this code to compile, but instead it gives an error: Invalid declaration type 'test_alias_1'

main.odin:

package main
test_alias_2 :: test_alias_1 // Invalid declaration type 'test_alias_1'
main :: proc() {}

test.odin:

package main
test_1 :: proc(val: int) {}
test_2 :: proc(val: f32) {}
test :: proc {test_1, test_2}
test_alias_1 :: test

It's a very particular setup: you must have two files and the alias must point to a procedure group. I haven't been able to trigger the bug any other way.

Workarounds:

  • move test_alias_2 to test.odin
  • move test_alias_1 to main.odin

Report

Odin: dev-2022-09:796c51ef
OS:   Windows 11 Professional (version: 21H2), build 22000.978
CPU:  Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
RAM:  32605 MiB
@github-actions github-actions bot added the stale label Jan 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant