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.
1 parent 1cd22b6 commit ac6e970Copy full SHA for ac6e970
lib/AST/ASTVerifier.cpp
@@ -2828,6 +2828,17 @@ class Verifier : public ASTWalker {
2828
abort();
2829
}
2830
2831
+ // Check that type members have an interface type of the form
2832
+ // (Self) -> (Args...) -> Result.
2833
+ if (AFD->getImplicitSelfDecl()) {
2834
+ if (!interfaceTy->castTo<AnyFunctionType>()
2835
+ ->getResult()->is<FunctionType>()) {
2836
+ Out << "Interface type of method must return a function";
2837
+ interfaceTy->dump(Out);
2838
+ abort();
2839
+ }
2840
2841
+
2842
// Throwing @objc methods must have a foreign error convention.
2843
if (AFD->isObjC() &&
2844
static_cast<bool>(AFD->getForeignErrorConvention())
0 commit comments