Repository: ReactiveX/RxSwift
File: Tests/RxCocoaTests/RXObjCRuntime+Testing.m (Objective-C)

Code before:
                                                                                                                                               \
-(void)voidJustCalledLargeToSay:(some_insanely_large_struct_t)value {                                                                          \
    [self.privateBaseMessages addObject:A([NSValue valueWithBytes:&value                                                                       \
                                                      objCType:@encode(some_insanely_large_struct_t)])];                                       \
    self.invokedMethod();                                                                                                                      \
}                                                                                                                                              \
                                                                                                                                               \
-(NSInteger)message_allSupportedParameters:(id __nullable)p1                                                                                   \
                                        p2:(Class __nullable)p2                                                                                \
                                        p3:(int32_t (^ __nullable)(int32_t))p3                                                                 \
                                        p4:(int8_t)p4                                                                                          \
                                        p5:(int16_t)p5                                                                                         \
                                        p6:(int32_t)p6                                                                                         \
                                        p7:(int64_t)p7                                                                                         \
                                        p8:(uint8_t)p8                                                                                         \
                                        p9:(uint16_t)p9                                                                                        \
                                       p10:(uint32_t)p10                                                                                       \
                                       p11:(uint64_t)p11                                                                                       \
                                       p12:(float)p12                                                                                          \
                                       p13:(double)p13                                                                                         \
                                       p14:(const int8_t * __nullable)p14                                                                      \
                                       p15:(int8_t * __nullable)p15                                                                            \
                                       p16:(some_insanely_large_struct_t)p16 {                                                                 \
    [self.privateBaseMessages addObject:A(                                                                                                     \
        p1 ?: [NSNull null],                                                                                                                   \
        p2 ?: [NSNull null],                                                                                                                   \
        p3 ?: defaultImpl,                                                                                                                     \
        @(p4),                                                                                                                                 \
        @(p5),                                                                                                                                 \
        @(p6),                                                                                                                                 \
        @(p7),                                                                                                                                 \
        @(p8),                                                                                                                                 \
        @(p9),                                                                                                                                 \
        @(p10),                                                                                                                                \
        @(p11),                                                                                                                                \
        @(p12),                                                                                                                                \
        @(p13),                                                                                                                                \
        [NSValue valueWithPointer:p14],                                                                                                        \
        [NSValue valueWithPointer:p15],                                                                                                        \
        [NSValue valueWithBytes:&p16 objCType:@encode(some_insanely_large_struct_t)],                                                          \
    )];                                                                                                                                        \
    self.invokedMethod();                                                                                                                      \
    return -5;                                                                                                                                 \
}                                                                                                                                              \
                                                                                                                                               \
                                                                                                                                               \
-(some_insanely_large_struct_t)hugeResult {                                                                                                    \
    some_insanely_large_struct_t huge = {};                                                                                                    \
    self.invokedMethod();                                                                                                                      \
    return huge;                                                                                                                               \
}                                                                                                                                              \

Review comment (suggestion):
Without these changes, the library built successfully, but Xcode could not build the tests with the following error:
```
.../RxSwift/Tests/RxCocoaTests/RXObjCRuntime+Testing.m:604:1: error: incompatible operand types ('Class _Nullable' and 'NSNull * _Nonnull') [-Werror]
IMPLEMENT_OBSERVING_CLASS_PAIR_FOR_TEST(shared)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.../RxSwift/Tests/RxCocoaTests/RXObjCRuntime+Testing.m:56:59: note: expanded from macro 'IMPLEMENT_OBSERVING_CLASS_PAIR_FOR_TEST'
#define IMPLEMENT_OBSERVING_CLASS_PAIR_FOR_TEST(testName) _IMPLEMENT_OBSERVING_CLASS_PAIR_FOR_TEST(testName,,)
                                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.../RxSwift/Tests/RxCocoaTests/RXObjCRuntime+Testing.m:310:12: note: expanded from macro '_IMPLEMENT_OBSERVING_CLASS_PAIR_FOR_TEST'
        p2 ?: [NSNull null],                                                                                                                   \
        ~~ ^  ~~~~~~~~~~~~~
.../RxSwift/Tests/RxCocoaTests/RXObjCRuntime+Testing.m:17:49: note: expanded from macro 'A'
#define A(...) [Arguments argumentsWithValues:@[__VA_ARGS__]]
                                                ^~~~~~~~~~~
```
It was complaining that `p2` being a `Class` does not go well along with a `NSNull` so I made sure `p2` was seen as an `id` with a cast.

Code after:
                                                                                                                                               \
-(void)voidJustCalledLargeToSay:(some_insanely_large_struct_t)value {                                                                          \
    [self.privateBaseMessages addObject:A([NSValue valueWithBytes:&value                                                                       \
                                                      objCType:@encode(some_insanely_large_struct_t)])];                                       \
    self.invokedMethod();                                                                                                                      \
}                                                                                                                                              \
                                                                                                                                               \
-(NSInteger)message_allSupportedParameters:(id __nullable)p1                                                                                   \
                                        p2:(Class __nullable)p2                                                                                \
                                        p3:(int32_t (^ __nullable)(int32_t))p3                                                                 \
                                        p4:(int8_t)p4                                                                                          \
                                        p5:(int16_t)p5                                                                                         \
                                        p6:(int32_t)p6                                                                                         \
                                        p7:(int64_t)p7                                                                                         \
                                        p8:(uint8_t)p8                                                                                         \
                                        p9:(uint16_t)p9                                                                                        \
                                       p10:(uint32_t)p10                                                                                       \
                                       p11:(uint64_t)p11                                                                                       \
                                       p12:(float)p12                                                                                          \
                                       p13:(double)p13                                                                                         \
                                       p14:(const int8_t * __nullable)p14                                                                      \
                                       p15:(int8_t * __nullable)p15                                                                            \
                                       p16:(some_insanely_large_struct_t)p16 {                                                                 \
    [self.privateBaseMessages addObject:A(                                                                                                     \
        p1 ?: [NSNull null],                                                                                                                   \
        (id)p2 ?: [NSNull null],                                                                                                               \
        p3 ?: defaultImpl,                                                                                                                     \
        @(p4),                                                                                                                                 \
        @(p5),                                                                                                                                 \
        @(p6),                                                                                                                                 \
        @(p7),                                                                                                                                 \
        @(p8),                                                                                                                                 \
        @(p9),                                                                                                                                 \
        @(p10),                                                                                                                                \
        @(p11),                                                                                                                                \
        @(p12),                                                                                                                                \
        @(p13),                                                                                                                                \
        [NSValue valueWithPointer:p14],                                                                                                        \
        [NSValue valueWithPointer:p15],                                                                                                        \
        [NSValue valueWithBytes:&p16 objCType:@encode(some_insanely_large_struct_t)],                                                          \
    )];                                                                                                                                        \
    self.invokedMethod();                                                                                                                      \
    return -5;                                                                                                                                 \
}                                                                                                                                              \
                                                                                                                                               \
                                                                                                                                               \
-(some_insanely_large_struct_t)hugeResult {                                                                                                    \
    some_insanely_large_struct_t huge = {};                                                                                                    \
    self.invokedMethod();                                                                                                                      \
    return huge;                                                                                                                               \
}                                                                                                                                              \