Recently I converted a project of mine to Swift 3 (https://github.com/dtartaglia/XStreamSwift) and I had to deal with a problem that I couldn't find an answer for. This article is about the problem and the solution I discovered.
There are lots of articles on the web about type erasing in Swift, but all the ones I found only dealt with a single level. I will recap the concept quickly:
protocol Listener
{
associatedtype ListenerValue