`type(of: s).foo()` gotcha

You may have been misled by the suggestive variable name: s in OP’s example is not of type S but is of some type T: P.

5 Likes