Skip to content

Commit c925f9d

Browse files
dinhvhmacdoum1
authored andcommitted
Fixed RCTAssert nullability
Summary: ``` Apps/Instagram/AppLibraries/IGReactKit/IGReactKit/IGReactRouteHelpers.m:54:5: error: implicit conversion from nullable pointer 'NSString * _Nullable' to non-nullable pointer type 'NSString * _Nonnull' [-Werror,-Wnullable-to-nonnull-conversion] RCTAssert(!(title != nil && logoAsTitle), @"Screen navigationOptions cannot have both title and logoAsTitle."); ^ Apps/Instagram/AppLibraries/IGReactKit/IGReactKit/IGReactRouteHelpers.m:54:5: error: implicit conversion from nullable pointer 'NSString * _Nullable' to non-nullable pointer type 'NSString * _Nonnull' [-Werror,-Wnullable-to-nonnull-conversion] /data/sandcastle/boxes/trunk-hg-fbobjc-fbsource/xplat/js/react-native-github/React/Base/RCTAssert.h:28:14: note: expanded from macro 'RCTAssert' file:@(__FILE__) lineNumber:__LINE__ description:__VA_ARGS__]; \ ``` Reviewed By: zats Differential Revision: D8509133 fbshipit-source-id: ae7027efc18716193c86fbeeec74d41d1879797f
1 parent 9c36ea8 commit c925f9d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

React/Base/RCTAssert.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ RCT_EXTERN BOOL RCTIsMainQueue(void);
2525
_RCTAssertFormat(#condition, __FILE__, __LINE__, __func__, __VA_ARGS__); \
2626
if (RCT_NSASSERT) { \
2727
[[NSAssertionHandler currentHandler] handleFailureInFunction:@(__func__) \
28-
file:@(__FILE__) lineNumber:__LINE__ description:__VA_ARGS__]; \
28+
file:(NSString * _Nonnull)@(__FILE__) lineNumber:__LINE__ description:__VA_ARGS__]; \
2929
} \
3030
} \
3131
} while (false)

0 commit comments

Comments
 (0)