Skip to content

Commit 740f8b8

Browse files
committed
SIL verifier: protocol and archetype method instructions can refer to polymorphic functions.
Swift SVN r6589
1 parent 21ab734 commit 740f8b8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/SIL/Verifier.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -561,12 +561,12 @@ class SILVerifier : public SILVerifierBase<SILVerifier> {
561561
void checkArchetypeMethodInst(ArchetypeMethodInst *AMI) {
562562
DEBUG(llvm::dbgs() << "verifying";
563563
AMI->print(llvm::dbgs()));
564-
FunctionType *methodType = AMI->getType(0).getAs<FunctionType>();
564+
AnyFunctionType *methodType = AMI->getType(0).getAs<AnyFunctionType>();
565565
DEBUG(llvm::dbgs() << "method type ";
566566
methodType->print(llvm::dbgs());
567567
llvm::dbgs() << "\n");
568568
require(methodType,
569-
"result method must be of a concrete function type");
569+
"result method must be a function type");
570570
require(methodType->isThin()
571571
== AMI->getLookupArchetype().castTo<ArchetypeType>()
572572
->requiresClass(),
@@ -595,9 +595,9 @@ class SILVerifier : public SILVerifierBase<SILVerifier> {
595595
}
596596

597597
void checkProtocolMethodInst(ProtocolMethodInst *EMI) {
598-
FunctionType *methodType = EMI->getType(0).getAs<FunctionType>();
598+
AnyFunctionType *methodType = EMI->getType(0).getAs<AnyFunctionType>();
599599
require(methodType,
600-
"result method must be of a concrete function type");
600+
"result method must be a function type");
601601
SILType operandType = EMI->getOperand().getType();
602602
require(methodType->isThin()
603603
== operandType.isClassExistentialType(),

0 commit comments

Comments
 (0)