home-assistant / Iconic

:art: Auto-generated icon font library for iOS, watchOS and tvOS
Apache License 2.0
1.58k stars 86 forks source link

The compiler is unable to check that this switch is exhaustive in reasonable time #87

Closed zhanleewo closed 4 years ago

zhanleewo commented 4 years ago

Hi! I download this library code from cocoapods and got an issue trying to build app "The compiler is unable to check that this switch is exhaustive in reasonable time"

Probably need to add default value.

image

image

dzenbot commented 4 years ago

You’re right. Both of those var need a default: return “”. This may never be hit, but it will trick the compiler at least.

Should be super easy to add, in the following lines: https://github.com/home-assistant/Iconic/blob/master/Source/iconic-default.stencil#L224

https://github.com/home-assistant/Iconic/blob/master/Source/iconic-default.stencil#L233

Want to give it shot @zhanleewo?

zhanleewo commented 4 years ago

Yes, I have done this. Since I think you will solve it in the future, so I did not provide a patch.

mitchins commented 4 years ago

Hi, this is still open... can we make it happen? I see no risk in using a default in any of the auto generated code because we can trust it is exhaustive as it is automatically done.