Skip to content

Commit 2e4de4f

Browse files
BridgeJS: Explicitly reject unsupported optional wrapped types
1 parent c336a3f commit 2e4de4f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Plugins/BridgeJS/Sources/BridgeJSLink/JSGlueGen.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1230,7 +1230,7 @@ struct IntrinsicJSFragment: Sendable {
12301230
printer.write("}")
12311231
scope.emitPushI32Parameter("\(isSomeVar) ? 1 : 0", printer: printer)
12321232
default:
1233-
()
1233+
throw BridgeJSLinkError(message: "Unsupported wrapped type for returning from JS function: \(wrappedType)")
12341234
}
12351235

12361236
return []

0 commit comments

Comments
 (0)