Skip to content

Desugared imports lead to unexpected resolutions #11582

@asterite

Description

@asterite

Aim

Given this code spread across two crates:

// This is in an aztec dependency
pub mod macros {
    pub mod aztec {
        pub fn aztec() {}
    }
    pub struct Something {}
}

// This is a crate importing aztec
use aztec::macros::{aztec, Something};

pub fn main() {}

we incorrectly get an error on macros saying that it can't be resolved.

The reason is that the use statement is desugared into:

use aztec::macros::aztec;
use aztec::macros::Something;

then the resolution of the first import affects the resolution of the second one, but it shouldn't.

Expected Behavior

The code should compile.

Bug

It doesn't compile.

To Reproduce

Workaround

None

Workaround Description

No response

Additional Context

No response

Project Impact

None

Blocker Context

No response

Nargo Version

No response

NoirJS Version

No response

Proving Backend Tooling & Version

No response

Would you like to submit a PR for this Issue?

None

Support Needs

No response

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions