I also had this problem and I found a workaround for my case.
In this article, the author has the same problem.
https://www.iphonelife.com/blog/31369/swift-programming-101-generics-practical-guide
So the problem is that the compiler must somehow infer the type T. But you are not allowed to just use the generic <type> (params ...).
Typically, the compiler can search for type T by looking at parameter types, because in many cases T. is used.
In my case, it was a little different, because the return type of my function was T. In your case, it seems that you did not use T in your function at all. I think you just simplified the example code.
So I have the following function
func getProperty<T>( propertyID : String ) -> T
And in the case of, for example,
getProperty<Int>("countProperty")
the compiler gives me
Cannot explicitly specialize a generic function
So, in order to give the compiler a different source of information in order to infer the type T, you must explicitly declare the type of the variable in which the return value is stored.
var value : Int = getProperty("countProperty")
Thus, the compiler knows that T must be an integer.
So, I think that overall it just means that if you specify a generic function, you need to at least use T in your parameter types or as a return type.