File tree Expand file tree Collapse file tree 2 files changed +2
-7
lines changed
Plugins/BridgeJS/Sources/BridgeJSLink Expand file tree Collapse file tree 2 files changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -1219,7 +1219,8 @@ public struct BridgeJSLink {
12191219 loweringFragment. parameters. count == 1 ,
12201220 " Lowering fragment should have exactly one parameter to lower "
12211221 )
1222- let loweredValues = try loweringFragment. printCode ( [ param. name] , context)
1222+ let paramName = scope. variable ( param. name)
1223+ let loweredValues = try loweringFragment. printCode ( [ paramName] , context)
12231224 parameterForwardings. append ( contentsOf: loweredValues)
12241225 }
12251226
Original file line number Diff line number Diff line change @@ -90,11 +90,6 @@ final class JSGlueVariableScope {
9090 JSGlueVariableScope ( intrinsicRegistry: intrinsicRegistry)
9191 }
9292
93- fileprivate func reserveNames( _ names: [ String ] ) {
94- for name in names {
95- variables. insert ( name)
96- }
97- }
9893}
9994
10095extension JSGlueVariableScope {
@@ -738,7 +733,6 @@ struct IntrinsicJSFragment: Sendable {
738733 printCode: { arguments, context in
739734 let ( scope, printer) = ( context. scope, context. printer)
740735 let value = arguments [ 0 ]
741- scope. reserveNames ( arguments)
742736 let isSomeVar = scope. variable ( " isSome " )
743737 printer. write ( " const \( isSomeVar) = \( kind. presenceCheck ( value: value) ) ; " )
744738
You can’t perform that action at this time.
0 commit comments