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

impl for type from other crate causes panic #2068

Closed
ghost opened this issue Jul 27, 2023 · 0 comments · Fixed by #2216
Closed

impl for type from other crate causes panic #2068

ghost opened this issue Jul 27, 2023 · 0 comments · Fixed by #2216
Assignees
Labels
bug Something isn't working compiler frontend `noirc_frontend` crate

Comments

@ghost
Copy link

ghost commented Jul 27, 2023

Aim

package a:

use dep::pkg_b::Server;

impl Server {
    fn bind(self) {}
}

fn main(x : Field, y : pub Field) {
    assert(x != y);
}

#[test]
fn test_main() {

}

package b:

struct Server {}

Expected Behavior

probably a compilation error

Bug

The application panicked (crashed).
Message:  No element at index
Location: crates/noirc_frontend/src/hir/def_collector/dc_crate.rs:229

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 Jul 27, 2023
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Noir Jul 27, 2023
@jfecher jfecher added compiler frontend `noirc_frontend` crate P-MEDIUM labels Jul 27, 2023
@kevaundray kevaundray assigned jfecher and ghost Aug 8, 2023
@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in Noir Aug 8, 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 compiler frontend `noirc_frontend` crate
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant