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

Duplicate symbols with static variable declared in macro #1248

Closed
cbuttner opened this issue Jul 19, 2024 · 2 comments
Closed

Duplicate symbols with static variable declared in macro #1248

cbuttner opened this issue Jul 19, 2024 · 2 comments
Assignees
Labels
Bug Something isn't working Fixed Needs Verification Fixed, but needs verification that it works

Comments

@cbuttner
Copy link
Contributor

module test;
import asdf;
import foo;
import std::io;

fn int main(String[] args) {
  bar();
  foo::bar();
  return 0;
}

fn void bar() {
  asdf::get_static();
}

module foo;
import asdf;
import std::io;

// Same function name
fn void bar() {
  asdf::get_static();
}

module asdf;

macro get_static() {
  static char x;
  return x;
}
/usr/bin/ld: build/tmp/foo.o:/tmp/test/src/main.c3:27: multiple definition of `bar.x'; build/tmp/test.o:/tmp/test/src/main.c3:27: first defined here
@lerno lerno self-assigned this Jul 20, 2024
@lerno lerno added the Bug Something isn't working label Jul 20, 2024
lerno added a commit that referenced this issue Jul 20, 2024
…ved error message when trying user foreach with an untyped list.
@lerno lerno added the Fixed Needs Verification Fixed, but needs verification that it works label Jul 20, 2024
@lerno
Copy link
Collaborator

lerno commented Jul 20, 2024

Visibility was set incorrectly. It should be working now.

@cbuttner
Copy link
Contributor Author

It's fixed on my end, thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Fixed Needs Verification Fixed, but needs verification that it works
Projects
None yet
Development

No branches or pull requests

2 participants