icerockdev / moko-kswift

Swift-friendly api generator for Kotlin/Native frameworks
https://moko.icerock.dev
Apache License 2.0
351 stars 21 forks source link

Eliminate Xcode warnings on generated code #46

Closed atticus183 closed 2 years ago

atticus183 commented 2 years ago

It seems 0.5.0 introduced the following Xcode warning:

Forced cast from 'Class.dataclass1' to 'Class.dataclass2' always succeeds

I propose removing the bang operator from the SealedToSwiftEnumFeature.kt file, specifically inside the buildSealedProperty method.

I will happily fork and create the PR myself 👍🏼.

Alex009 commented 2 years ago

will be released in 0.6.0

sebj commented 2 years ago

I've just started looking at this library, but I think I'm running into this issue even though it's supposed to be fixed in 0.6.0. I'm seeing 125 Xcode warnings inside my generated Swift file for forced cast from '..' to '..' always succeeds, did you mean to use 'as'?.

My environment:

hoc081098 commented 1 year ago

Version 0.6.0 still have this issue