Skip to content
This repository was archived by the owner on Jan 10, 2023. It is now read-only.

Commit 90033fe

Browse files
committed
[Runtime] Fix const cast warning in ReflectionMirror.cpp
rdar://problem/70444932
1 parent e29c19c commit 90033fe

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

stdlib/public/runtime/ReflectionMirror.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,8 @@ struct ClassImpl : ReflectionMirrorImpl {
674674
fieldOffset = Clas->getFieldOffsets()[i];
675675
} else {
676676
#if SWIFT_OBJC_INTEROP
677-
Ivar *ivars = class_copyIvarList((Class)Clas, nullptr);
677+
Ivar *ivars = class_copyIvarList(
678+
reinterpret_cast<Class>(const_cast<ClassMetadata *>(Clas)), nullptr);
678679
fieldOffset = ivar_getOffset(ivars[i]);
679680
free(ivars);
680681
#else

0 commit comments

Comments
 (0)