Files
swift-mirror/test/Interop/Cxx/reference/Inputs/const-ref-parameter.h
Daniel Rodríguez Troitiño 691dcc9bb3 Test case for const T& in Obj-C++ methods
Add a test case that checks the behaviour introduced during the refactor
of `importFunctionParameterList` and `importMethodParamsAndReturnType`.

The test checks that both Obj-C++ methods and C++ functions treat `const
T&` parameters in the same way.
2022-09-02 11:51:15 -07:00

23 lines
673 B
Objective-C

#import <Foundation/Foundation.h>
struct OptionsStruct {
int intOption;
float floatOption;
};
@interface OptionsConsumerObjC : NSObject
- (nonnull instancetype)initWithOptions:(const OptionsStruct &)options;
+ (nonnull instancetype)consumerWithOptions:(const OptionsStruct &)options;
+ (int)doThingWithOptions:(const OptionsStruct &)options;
- (float)doOtherThingWithOptions:(const OptionsStruct &)options;
@end
struct OptionsConsumerCxx {
OptionsConsumerCxx(const OptionsStruct &options);
static OptionsConsumerCxx build(const OptionsStruct &options);
static int doThing(const OptionsStruct &options);
float doOtherThing(const OptionsStruct &options);
};