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

Enhancing error message when referring @private / @local from other module. #1769

Open
alexveden opened this issue Jan 4, 2025 · 1 comment

Comments

@alexveden
Copy link

When calling the left module (@Private / @Local) code from the right module:
image

 6:
 7: fn void test_add() {
 8:
 9:     assert(4 == foo::add_priv(4, 4));
                         ^^^^^^^^
(test_foo.c3:9:22) Error: 'foo::add_priv' could not be found, did you perhaps want 'foo::add'?

 7: fn void test_add() {
 8:
 9:     assert(4 == foo::add_priv(4, 4));
10:     assert(4 == foo::add_local(4, 4));
                         ^^^^^^^^^
(test_foo.c3:10:22) Error: 'foo::add_local' could not be found, did you perhaps want 'foo::add'?

Maybe it could be more informative to refer to these members as @Private / @Local in error messages?

@lerno
Copy link
Collaborator

lerno commented Jan 4, 2025

Local is going to be hard, since that one is not usually placed anywhere. But at least we can improve @private

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants