mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
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.
23 lines
673 B
Objective-C
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);
|
|
};
|