diff options
Diffstat (limited to 'test/Rewriter/rewrite-modern-throw.m')
-rw-r--r-- | test/Rewriter/rewrite-modern-throw.m | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/Rewriter/rewrite-modern-throw.m b/test/Rewriter/rewrite-modern-throw.m index 1912384..1564611 100644 --- a/test/Rewriter/rewrite-modern-throw.m +++ b/test/Rewriter/rewrite-modern-throw.m @@ -65,3 +65,29 @@ int main() } } @end + +// rdar://13186010 +@class NSDictionary, NSException; +@class NSMutableDictionary; + +@interface NSString ++ (id)stringWithFormat:(NSString *)format, ... ; +@end + +@interface NSException ++ (NSException *)exceptionWithName:(NSString *)name reason:(NSString *)reason userInfo:(NSDictionary *)userInfo; +@end +id *_imp__NSInvalidArgumentException; + +@interface NSSetExpression @end + +@implementation NSSetExpression +-(id)expressionValueWithObject:(id)object context:(NSMutableDictionary*)bindings { + id leftSet; + id rightSet; + @throw [NSException exceptionWithName: *_imp__NSInvalidArgumentException reason: [NSString stringWithFormat: @"Can't evaluate set expression; left subexpression not a set (lhs = %@ rhs = %@)", leftSet, rightSet] userInfo: 0]; + + return leftSet ; +} +@end + |