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

Compiler sees imported functions as being part of the contract #1111

Closed
1 task
jfecher opened this issue Apr 6, 2023 · 0 comments · Fixed by #1112
Closed
1 task

Compiler sees imported functions as being part of the contract #1111

jfecher opened this issue Apr 6, 2023 · 0 comments · Fixed by #1112
Labels
bug Something isn't working

Comments

@jfecher
Copy link
Contributor

jfecher commented Apr 6, 2023

Aim

Trying to compile a contract with one function:

contract foo {
    use dep::bar::baz;

    fn desired_contract_function() { }
}

Expected behavior

Expected the contract to contain 1 function - desired_contract_function

Bug

The contract actually contains 2 functions, desired_contract_function, and baz provided baz is a function imported in scope.

A similar error can be made for #[test] functions, although this does not trigger as often since all imported functions without the #[test] attribute are filtered out.

To reproduce

Installation method

None

Nargo version

No response

@noir-lang/noir_wasm version

No response

@noir-lang/barretenberg version

No response

@noir-lang/aztec_backend version

No response

Additional context

No response

Submission Checklist

  • Once I hit submit, I will assign this issue to the Project Board with the appropriate tags.
@jfecher jfecher added the bug Something isn't working label Apr 6, 2023
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Noir Apr 6, 2023
@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in Noir Apr 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant