Skip to content

Commit 799def2

Browse files
I tightened up the array return handling in the JS glue per the review:
- **JSGlueGen.swift**: merged the import/export array return handling into a single `return try arrayLower(...)` branch; no behavioral change, just removes redundant switch. Tests (BridgeJS runtime, with new array coverage) still pass: - `SWIFT_SDK_ID=DEVELOPMENT-SNAPSHOT-2025-11-03-a-wasm32-unknown-wasip1 make unittest` (20 suites / 96 tests).
1 parent 389fe9e commit 799def2

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

Plugins/BridgeJS/Sources/BridgeJSLink/JSGlueGen.swift

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1633,12 +1633,7 @@ struct IntrinsicJSFragment: Sendable {
16331633
message: "Namespace enums are not supported to be returned from imported JS functions: \(string)"
16341634
)
16351635
case .array(let elementType):
1636-
switch context {
1637-
case .importTS:
1638-
return try arrayLower(elementType: elementType)
1639-
case .exportSwift:
1640-
return try arrayLower(elementType: elementType)
1641-
}
1636+
return try arrayLower(elementType: elementType)
16421637
}
16431638
}
16441639

0 commit comments

Comments
 (0)