Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eliminate Xcode warnings on generated code #46

Closed
atticus183 opened this issue May 27, 2022 · 3 comments · Fixed by #47
Closed

Eliminate Xcode warnings on generated code #46

atticus183 opened this issue May 27, 2022 · 3 comments · Fixed by #47
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@atticus183
Copy link
Contributor

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 Alex009 linked a pull request May 28, 2022 that will close this issue
@Alex009 Alex009 changed the title Remove bang operator to eliminate Xcode warnings Eliminate Xcode warnings on generated code May 28, 2022
@Alex009 Alex009 added the enhancement New feature or request label May 28, 2022
Alex009 added a commit to atticus183/moko-kswift that referenced this issue Aug 6, 2022
# Conflicts:
#	kswift-gradle-plugin/src/main/kotlin/dev/icerock/moko/kswift/plugin/feature/SealedToSwiftEnumFeature.kt
Alex009 added a commit to atticus183/moko-kswift that referenced this issue Aug 6, 2022
Alex009 added a commit that referenced this issue Aug 7, 2022
#46 Remove bang operator to eliminate Xcode warnings
@Alex009 Alex009 added this to the 0.6.0 milestone Aug 7, 2022
@Alex009
Copy link
Member

Alex009 commented Aug 7, 2022

will be released in 0.6.0

@Alex009 Alex009 closed this as completed Aug 7, 2022
@Alex009 Alex009 mentioned this issue Aug 7, 2022
@sebj
Copy link

sebj commented Aug 8, 2022

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:

  • KSwift version 0.6.0
  • Xcode 13.4.1 (13F100)
  • Targeting iOS 14.1+
  • Manually integrating the generated Swift files rather than using Cocoapods

@hoc081098
Copy link

Version 0.6.0 still have this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants