Usings fail over different namespaces

mod proj {
    mod m1 {
        use m2::a;
    }

    mod m2 {
        use b::a;
        mod b {
            fn a() {}
        }
    }
}

produces

error: Use of undeclared name m2::a
  ┌─ src/playground.spade:2:9
  │
2 │     use m2::a;
  │         ^^^^^ Undeclared name

where just use m2; works.

This happens because when resolving the m2 in the import, the concatenated namespace is still proj::m1, so it searches for proj::m1::m2. (TODO: figure out why just use m2; works)

Edited by DasLixou