That is currenlty the correct behaviour. How should the compiler know where to start the query?
Consider the a similar example of color types:
class NSColor {
static let clear: NSColor { ... }
var cgColor: CGColor { ... }
}
class UIColor {
static let clear: UIColor { ... }
var cgColor: CGColor { ... }
}
let color: CGColor = .clear.cgColor // This is ambiguous
In your example even if there is no second SubStruct nested anywhere the compiler does not know where to start querying to get the correct and expected result.
In case that I said something wrong, please feel free to correct me.
IIRC this topic was discussed quite a few times before. You may want to search the forums for it and open a new discussion thread on the evolution if you want to push it further. If you're going to tackle it please provide new information and summarize everything that has already been said and considered. Please also note that simply bumping old threads is discouraged. Site admins tend to close threads that are bumped.
Oh. I didn't know that. I tried looking for a discussion about before starting this thread and again now, but I wasn't able to find any. Can you point me towards a thread or search term which will help me find the thread?