File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -103,6 +103,16 @@ class ClassWithCustomNameSub : ClassWithCustomName {}
103
103
func isKind( of aClass: AnyClass ) -> Bool { return false }
104
104
}
105
105
106
+ // CHECK-LABEL: @interface DiscardableResult : NSObject
107
+ // CHECK-NEXT: - (NSInteger)nonDiscardable:(NSInteger)x SWIFT_WARN_UNUSED_RESULT;
108
+ // CHECK-NEXT: - (NSInteger)discardable:(NSInteger)x;
109
+ // CHECK-NEXT: - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
110
+ // CHECK-NEXT: @end
111
+ class DiscardableResult : NSObject {
112
+ func nonDiscardable( _ x: Int ) -> Int { return x }
113
+ @discardableResult func discardable( _ x: Int ) -> Int { return x }
114
+ }
115
+
106
116
// CHECK-LABEL: @interface Initializers
107
117
// CHECK-NEXT: - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
108
118
// CHECK-NEXT: - (nonnull instancetype)initWithInt:(NSInteger)_;
You can’t perform that action at this time.
0 commit comments