We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 232323a + 052da16 commit 958420eCopy full SHA for 958420e
lib/Sema/TypeCheckDeclObjC.cpp
@@ -846,7 +846,7 @@ bool swift::isRepresentableInLanguage(
846
}
847
848
// Check that @objc functions can't have typed throw.
849
- if (AFD->hasThrows()) {
+ if (!AFD->getDeclContext()->isInSwiftinterface() && AFD->hasThrows()) {
850
Type thrownType = AFD->getThrownInterfaceType();
851
// TODO: only `throws(Error)` is allowed.
852
// Throwing `any MyError` that confronts `Error` is not implemented yet.
0 commit comments