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 52c732f commit 5e1520eCopy full SHA for 5e1520e
lib/SIL/Verifier/SILVerifier.cpp
@@ -1932,6 +1932,10 @@ class SILVerifier : public SILVerifierBase<SILVerifier> {
1932
require(resultInfo->getExtInfo().hasContext(),
1933
"result of closure cannot have a thin function type");
1934
1935
+ // We rely on all indirect captures to be in the argument list.
1936
+ require(PAI->getCallee()->getType().isObject(),
1937
+ "Closure callee must not be an address type.");
1938
+
1939
checkApplyTypeDependentArguments(PAI);
1940
1941
auto substTy = checkApplySubstitutions(PAI->getSubstitutionMap(),
0 commit comments