Code analysis false error

I'm analyzing my code and under  "Data Flow analysis / Context-Sensitive analysis" I found an error that say "Condition is always false"

This is the related code:

 
UserMessagesViewController *userMessagesViewController = (UserMessagesViewController *)segue.destinationViewController;
if
([userMessagesViewController isKindOfClass:[UINavigationController class]]) {



We can argue that this is a codesmell, but definetely is not true that the condition is always false.

1
2 comments

I have the same error in 2018.3.4

BOOL allHidden = YES;
for (UIView* subview in self.subviews) {
if ([subview isKindOfClass:[AbstractEditor class]] && !subview.hidden) {
allHidden = NO;
break;
}
}

And of course the AbstractEditor is direct descendant of UIView

@interface AbstractEditor : UIView
0
Avatar
Permanently deleted user

Pavel,

we have corresponding ticket in tracker. Please vote & watch it.

0

Please sign in to leave a comment.