Skip to content

Commit 516e247

Browse files
committed
BridgeJS: Fix build error on CI
1 parent 516e46b commit 516e247

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Sources/JavaScriptKit/BridgeJSInstrincics.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,8 +422,9 @@ where Self: RawRepresentable, RawValue: _BridgedSwiftTypeLoweredIntoSingleWasmCo
422422
public mutating func expectTag(_ expected: _BJSParamType) {
423423
let rawTag = readUInt8()
424424
guard let got = _BJSParamType(rawValue: rawTag), got == expected else {
425+
let resultString = _BJSParamType(rawValue: rawTag).map { "\($0)" } ?? "invalid(\(rawTag))"
425426
preconditionFailure(
426-
"BridgeJS: mismatched enum param tag. Expected \(expected) got \(String(describing: _BJSParamType(rawValue: rawTag)))"
427+
"BridgeJS: mismatched enum param tag. Expected \(expected) got \(resultString))"
427428
)
428429
}
429430
}

0 commit comments

Comments
 (0)