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

force_unwrapping: False positive on IUO closure property declaration #614

Closed
ldiqual opened this issue Apr 13, 2016 · 1 comment
Closed
Labels
bug Unexpected and reproducible misbehavior.

Comments

@ldiqual
Copy link

ldiqual commented Apr 13, 2016

private var myProperty: (Void -> Void)! // Line 30

triggers

/path/code.swift:30:50: warning: Force Unwrapping Violation: Force unwrapping should be avoided. (force_unwrapping)
@jpsim jpsim added the bug Unexpected and reproducible misbehavior. label Apr 13, 2016
@pwc3
Copy link

pwc3 commented Apr 19, 2016

I ran into the same thing. Adding a typealias for the block type works around the issue, but in this case, I just added a // swiftlint:disable:this force_unwrapping comment.

otaviolima added a commit to otaviolima/SwiftLint that referenced this issue May 29, 2017
otaviolima added a commit to otaviolima/SwiftLint that referenced this issue May 29, 2017
otaviolima added a commit to otaviolima/SwiftLint that referenced this issue May 29, 2017
otaviolima added a commit to otaviolima/SwiftLint that referenced this issue May 29, 2017
otaviolima added a commit to otaviolima/SwiftLint that referenced this issue May 29, 2017
otaviolima added a commit to otaviolima/SwiftLint that referenced this issue May 29, 2017
otaviolima added a commit to otaviolima/SwiftLint that referenced this issue May 29, 2017
otaviolima added a commit to otaviolima/SwiftLint that referenced this issue Jun 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unexpected and reproducible misbehavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants