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

traits do not support specifying visibility #3478

Closed
ghost opened this issue Nov 12, 2023 · 2 comments
Closed

traits do not support specifying visibility #3478

ghost opened this issue Nov 12, 2023 · 2 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@ghost
Copy link

ghost commented Nov 12, 2023

Aim

mod foo {
    mod bar {
        pub trait T {
            fn f(self) {}
        }
    }
}

Expected Behavior

everything is okay

Bug

error: No module `foo` at path `hello/src/foo.nr`
  ┌─ hello/src/main.nr:1:5
  │
1 │ mod foo {
  │     ---
  │

error: Expected a ; but found {
  ┌─ hello/src/main.nr:1:9
  │
1 │ mod foo {
  │         -
  │

error: Expected an end of input but found {
  ┌─ hello/src/main.nr:1:9
  │
1 │ mod foo {
  │         -
  │

To Reproduce

Installation Method

Compiled from source

Nargo Version

No response

Additional Context

No response

Would you like to submit a PR for this Issue?

No

Support Needs

No response

@ghost ghost added the bug Something isn't working label Nov 12, 2023
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Noir Nov 12, 2023
@kevaundray kevaundray added this to the 1.0 milestone Jan 15, 2024
@jfecher
Copy link
Contributor

jfecher commented Jan 17, 2024

Looks like we aren't parsing visibility modifiers on traits at all, so they fail to parse leading to the odd parsing error message.

@TomAFrench
Copy link
Member

Closing in favour of #4775

@TomAFrench TomAFrench closed this as not planned Won't fix, can't repro, duplicate, stale Apr 16, 2024
@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in Noir Apr 16, 2024
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

No branches or pull requests

3 participants