Compiler bug in Xcode 10.2 for Enums with Associated Values

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.

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

cc @Erik_Eckstein @Michael_Gottesman

I guess opening a ticket on

Having the same issue here, looks like"enum%20associated" it was fixed on swift4 and re-appeared on xcode10.2

Terms of Service

Privacy Policy

Cookie Policy