[componentkit][test] typedef struct -> class

Reviewed By: dulmarod

Differential Revision: D3909628

fbshipit-source-id: 52e9539
master
Ryan Rhee 8 years ago committed by Facebook Github Bot 6
parent f54b84c751
commit d2ac2242c4

@ -72,16 +72,19 @@
}
@end
typedef struct { int a; } BarStruct;
class BarClass {
public:
int a;
};
@interface BarComponent : CKCompositeComponent
@end
@implementation BarComponent
+ (instancetype) new {
// C++ structs
BarStruct s1; // error
const BarStruct& s2 = s1; // no error
BarStruct& s3 = s1; // error
const BarStruct s4 = {.a = 3}; // no error
// C++ classes
BarClass s1; // error
const BarClass& s2 = s1; // no error
BarClass& s3 = s1; // error
const BarClass s4 = {.a = 3}; // no error
}
@end

@ -1,5 +1,5 @@
componentkit/Test.mm, BarComponent_new, 82, MUTABLE_LOCAL_VARIABLE_IN_COMPONENT_FILE
componentkit/Test.mm, BarComponent_new, 84, MUTABLE_LOCAL_VARIABLE_IN_COMPONENT_FILE
componentkit/Test.mm, BarComponent_new, 85, MUTABLE_LOCAL_VARIABLE_IN_COMPONENT_FILE
componentkit/Test.mm, BarComponent_new, 87, MUTABLE_LOCAL_VARIABLE_IN_COMPONENT_FILE
componentkit/Test.mm, FooComponent_newWithString:, 48, MUTABLE_LOCAL_VARIABLE_IN_COMPONENT_FILE
componentkit/Test.mm, FooComponent_newWithString:, 53, MUTABLE_LOCAL_VARIABLE_IN_COMPONENT_FILE
componentkit/Test.mm, FooComponent_newWithString:, 55, MUTABLE_LOCAL_VARIABLE_IN_COMPONENT_FILE

Loading…
Cancel
Save