Same named struct one private and another public - how to access them seperate

Viewed 36

I have two files in in my project

A.swift

struct A {
    static let name = "Name"
}

B.swift

class ABC {
    private struct A {
       static let local = "local name"
    }

    func something() {
      // How to access A.name from here?
    }
}
1 Answers

Assuming the name of your project/module is MyProject

func something() {
    print(MyProject.A.name)
}
Related