Skip to content

Commit 841b583

Browse files
committed
Add Foundation
1 parent 3afddfa commit 841b583

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

test/decl/func/typed_throws.swift

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,5 +220,9 @@ func badThrowingFunctionType<T>(_: () throws(NotAnError<T>) -> ()) {}
220220
enum ObjCError: Int, Error {
221221
case Others
222222
}
223-
@objc func objcTypedThrow() throws(ObjCError) -> () {}
224-
// expected-error@-1 {{@objc functions cannot have typed throw}}
223+
224+
import Foundation
225+
@objc class ObjCClass: NSObject {
226+
@objc func objcTypedThrow() throws(ObjCError) -> () {}
227+
// expected-error@-1 {{@objc functions cannot have typed throw}}
228+
}

0 commit comments

Comments
 (0)