How specify module for nested declaration?

Hi,
How is it possible to specify a module for nested declaration where the name declaration name already exists from another module?

// module A
extension UIImage {
  public enum Assets {
    public static var valueA: UIImage { ... }
  }
}

// module B
import ModuleA
extension UIImage {
  public enum Assets {
    public static var valueB: UIImage { ... }
  }
}

In this case, if I'm in ModuleB and typing UIImage. the autocomplete suggests only valueB but it's still possible to type valueA and it will work. Is it possible to help autocomplete to verify a module where we need to take the value.
When I'm trying ModuleA.UIImage. it's still suggested from ModuleB

It is not currently possible to do so. There is experimental work ongoing for "fully qualified name syntax," but this is in the early stages and not a part of Swift's plan of record.

1 Like
Terms of Service

Privacy Policy

Cookie Policy