diff --git a/Sources/CasePaths/EnumReflection.swift b/Sources/CasePaths/EnumReflection.swift index 558bd1f8..dda44d9c 100644 --- a/Sources/CasePaths/EnumReflection.swift +++ b/Sources/CasePaths/EnumReflection.swift @@ -328,9 +328,11 @@ private struct MetadataKind: Equatable { } @_spi(Reflection) public func tag(of value: Enum) -> UInt32 { + #if swift(<5.8) // NB: Workaround for https://github.com/apple/swift/issues/61708 guard self.typeDescriptor.emptyCaseCount + self.typeDescriptor.payloadCaseCount > 1 else { return 0 } + #endif return withUnsafePointer(to: value) { self.valueWitnessTable.getEnumTag($0, self.ptr) }