Now back to the original point of my post. Try putting the above Result enum into the Playground or your project code (that’s what I did immediately after reading about it…). Hint: It will not work! From my understanding, this is because the compiler doesn’t know how much memory to allocate for the generic type in the enum.

Hopefully this will be fixed in future versions of Swift, but for now the workout is to “Box” your generic type – in other words, wrap it in a class.