In the first example, the struct is defining a completely new type with new type metadata, its own initializers and property getters/setters, and so forth. In the second, the typealias is merely a new name for an existing type; nothing new is being generated (and AFAICT, typealiases that aren't accessible outside the module aren't emitted at all in the serialized module file).
What difference would it make? Ie, let's say S is the same type no matter the type parameter (because it doesn't use any type parameter), what problem can it cause? The type is only available/existing within the scope of the function afaics.
Right, I didn't think about static stored properties. So it seems like S (or Bar) should not be the same type for different type parameters then, which would sort of make them generic, but static stored properties are not allowed in generic types ...