<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Aug 6, 2012, at 22:16 , Anna Zaks <<a href="mailto:ganna@apple.com">ganna@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span style="font-family: monospace; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; display: inline !important; float: none; ">What do you mean by counter example? Is it not possible to have an invocation of setWithArray method in which self is NSSet? Or do you mean that in this case you would like to split the path and test both scenarios - one in which self is NSSet and one in which we don't know what it is?<span class="Apple-converted-space"> </span></span><br style="font-family: monospace; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><br style="font-family: monospace; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><br style="font-family: monospace; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><blockquote type="cite" style="font-family: monospace; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">@implementation NSSet<br>+ (void)setWithArray:(NSArray *)array {<br>return [[[self alloc] initWithArray:array] autorelease];<br>}<br>@end<br><br>NSMutableSet *makeSet(NSArray *array) {<br>return [NSMutableSet setWithArray:array]; // calls +[NSSet setWithArray:], but returns an NSMutableSet.<br>}<br></blockquote></blockquote></div><br><div>If analyzing makeSet and inlining +[NSMutableSet setWithArray:], we have a case where we "know" +[self alloc] will <i>not</i> create an NSSet, and so we won't want to try to inline any NSSet methods that NSMutableSet might override. So I would definitely like to split the path when analyzing +[NSSet setWithArray:] in isolation, and <i>not</i> split the path when inlining it.</div><div><br></div><div>All of this is fallout from checking syntactically for the 'self' variable, which really is just a hidden argument like any other.</div></body></html>