FuelLabs / sway

🌴 Empowering everyone to build reliable and efficient smart contracts.

Home Page:https://fuellabs.github.io/sway

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ambiguous star imports resolved incorrectly

jjcnn opened this issue · comments

commented

a.sw

library;

struct MyStruct { ... }

b.sw

library; 

struct MyStruct { ... }

main.sw

script;

use a::*;
use b::*;  // MyStruct is now ambiguous, which is fine as long as it's not used

fn main() {
  let x = MyStruct { ... };  // This should be an error, but resolves to b::MyStruct
}