From e11cdc917c131dcd11ef06872c01d6f1917409ef Mon Sep 17 00:00:00 2001 From: Hoa Dinh Date: Mon, 18 Jun 2018 23:45:21 -0700 Subject: [PATCH] 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 --- React/Base/RCTAssert.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/React/Base/RCTAssert.h b/React/Base/RCTAssert.h index 5e60a7b206a..95d210a5e0c 100644 --- a/React/Base/RCTAssert.h +++ b/React/Base/RCTAssert.h @@ -25,7 +25,7 @@ RCT_EXTERN BOOL RCTIsMainQueue(void); _RCTAssertFormat(#condition, __FILE__, __LINE__, __func__, __VA_ARGS__); \ if (RCT_NSASSERT) { \ [[NSAssertionHandler currentHandler] handleFailureInFunction:@(__func__) \ - file:@(__FILE__) lineNumber:__LINE__ description:__VA_ARGS__]; \ + file:(NSString * _Nonnull)@(__FILE__) lineNumber:__LINE__ description:__VA_ARGS__]; \ } \ } \ } while (false)