diff options
Diffstat (limited to 'test/SemaObjCXX/Inputs/nullability-pragmas-generics-1.h')
-rw-r--r-- | test/SemaObjCXX/Inputs/nullability-pragmas-generics-1.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/SemaObjCXX/Inputs/nullability-pragmas-generics-1.h b/test/SemaObjCXX/Inputs/nullability-pragmas-generics-1.h new file mode 100644 index 0000000..9a51fa1 --- /dev/null +++ b/test/SemaObjCXX/Inputs/nullability-pragmas-generics-1.h @@ -0,0 +1,21 @@ +#pragma clang assume_nonnull begin + +__attribute__((objc_root_class)) +@interface B +@end + +@interface C : B +@end + +__attribute__((objc_root_class)) +@interface NSGeneric<T : B *> // expected-note{{type parameter 'T' declared here}} +- (T)tee; +- (nullable T)maybeTee; +@end + +typedef NSGeneric<C *> *Generic_with_C; + +#pragma clang assume_nonnull end + +@interface NSGeneric<T : C *>(Blah) // expected-error{{type bound 'C *' for type parameter 'T' conflicts with previous bound 'B *'}} +@end |