Compiler bug in Xcode 10.2 for Enums with Associated Values

(J. Ullstrm) #1

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.

(Suyash Srijan) #2

I can reproduce this with -O, but not -Onone.

cc @Erik_Eckstein @Michael_Gottesman

(David Hart) #3

I guess opening a ticket on