Summary: This diff adds fields for ObjC properties to the type environment. For example, ``` property type fieldname; ``` when the property name is "fieldname", this diff adds a struct field of the same name. The missing type information were problematic in inferbo, since its semantics depend on types. Reviewed By: ezgicicek Differential Revision: D28421998 fbshipit-source-id: e24059846master
parent
8f1df1f11e
commit
291d250b9b
@ -0,0 +1,13 @@
|
||||
/*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface MyData : NSObject<NSCopying>
|
||||
|
||||
@property(nonatomic, readonly, copy) NSString* name;
|
||||
|
||||
@end
|
@ -0,0 +1,13 @@
|
||||
/*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
#import "MyData.h"
|
||||
|
||||
@implementation MyData
|
||||
|
||||
@synthesize name;
|
||||
|
||||
@end
|
@ -0,0 +1,14 @@
|
||||
/*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "MyData.h"
|
||||
|
||||
void getter_property_linear(MyData* data) {
|
||||
NSString* dn = data.name;
|
||||
for (int i = 0; i < dn.length; i++) {
|
||||
}
|
||||
}
|
Loading…
Reference in new issue