Basically this code produces very odd results in release builds with [-O] Optimization Level. (See attached screenshot).
My bet is that it has something to do with the new "@unknown default" since it works with a custom Enum as Associated Value.
I will file a bug for this! Sorry if this post is unnecessary.