These error messages you mention shouldn't actually arise. What you are talking about would happen in case of ambiguity, which is resolved by shadowing.
However, these issues belong to people. I mean, its a mistake, not a compiler error. This is somehow similar to saying " quantifier expressions in higher math are confusing and cause a lot of issues. Not only they are hard to understand when long, but, for instance, people accidentally rearrange quantifiers which can lead to expressions meaning completely different things." Well, that is true, and to people who are unfamiliar with the mathematical apparatus this indeed happens, as well as what you mentioned - to people relatively unfamiliar with Swift. However, that obviously doesn't mean we have to give up on whatever causes accidents or confusion.
I must agree, though partially. The issue in question isn't that important right now. It is important in the same way some not-very-frequently-used method of Array. Not vital, can be implemented without any special effort, yet a part of the vast functionality Array vends and the Standard Library itself. Type inference is also a considerable part of Swift's semantics and a feature that in some sense makes Swift stand out. I believe this is something the compiler eventually has to be capable of as type inference enhances and the language evolves. Right now it is either severely unperformant to infer types in such cases or the issue simply hasn't reached the hands of the core team.
Here are some more examples:
class A<T> {}
class Foo {
func foo<A>(_ arg: A) {
let a = A<Bool>()
}
}
It is quite obvious I am referring to an existing type A<T>. Although I am explicitly disambiguating A, the compiler keeps shadowing in favor of the parameter A. Here is an analogous case:
class Foo {
let n = false
func foo<A>(_ arg: A) {
let n = false
print(n, self.n)
}
}
self.n is shadowed by n until I explicitly disambiguate with self. This is of course much simpler to solve though.
This one is more contradictory. Like my very first example. However, there is still no ambiguity.
class A<T> {}
class Foo<U> {
func foo<A>(_ arg1: A, _ arg2: A<U>) {}
}
I want to note that there are moments when you can't infer a type in the general case.
class A<T> {}
class Foo {
func foo() {
class A<T> {}
}
}