Skip to content

Commit e048c21

Browse files
committed
embedded: Don't assume that when calling a function with witness-method convention an existential is involved
Fixes a wrong "cannot use a value of protocol type in embedded Swift" error. Unfortunately I don't have a test file for this.
1 parent 0e0c9f1 commit e048c21

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

lib/SIL/Utils/InstructionUtils.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -961,8 +961,6 @@ RuntimeEffect swift::getRuntimeEffect(SILInstruction *inst, SILType &impactType)
961961
rt |= RuntimeEffect::ObjectiveC | RuntimeEffect::MetaData;
962962
break;
963963
case SILFunctionTypeRepresentation::WitnessMethod:
964-
rt |= RuntimeEffect::MetaData | RuntimeEffect::Existential;
965-
break;
966964
case SILFunctionTypeRepresentation::CFunctionPointer:
967965
case SILFunctionTypeRepresentation::CXXMethod:
968966
case SILFunctionTypeRepresentation::Thin:

0 commit comments

Comments
 (0)