In Swift, it’s not possible to know if T is Printable or am I missing something?
“Cannot downcast from T to non- protocol Printable”
Conversation
Correct.
1
1
know limitation? or shouldn’t I be doing what I’m trying to do?
1
Suggest using function overloading to accomplish your goals.
1
1
Replying to
Replying to
function overloading with a more specific type will work though! This is what you mean? gist.github.com/JaviSoto/9d112
2
Show replies

