Skip to content

Commit c187b5e

Browse files
committed
IRGen: correct the typecast (NFC)
This seems unused currently, as attempting to query the DeclContext of these types results in an immediate assertion that the kind of entity is invalid. These are non-root protocol conformances, use `getProtocolConformance` instead of the copy-paste value of `getRootProtocolConformance`.
1 parent e8a7b1b commit c187b5e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/IRGen/Linking.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -988,8 +988,8 @@ DeclContext *LinkEntity::getDeclContextForEmission() const {
988988
case Kind::ReflectionAssociatedTypeDescriptor:
989989
case Kind::ProtocolWitnessTableLazyCacheVariable:
990990
case Kind::ProtocolWitnessTableLazyAccessFunction:
991-
return getRootProtocolConformance()->getDeclContext();
992-
991+
return getProtocolConformance()->getDeclContext();
992+
993993
case Kind::TypeMetadata: {
994994
auto ty = getType();
995995
// Only fully concrete nominal type metadata gets emitted eagerly.

0 commit comments

Comments
 (0)