Skip to content

Commit

Permalink
Fix Swift 5.4
Browse files Browse the repository at this point in the history
  • Loading branch information
donn committed Jan 14, 2024
1 parent 23fb51a commit 2985d5c
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions Sources/Fault/Entries/chain.swift
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,12 @@ func chainInternal(
module.definition.portlist.ports = Python.tuple(ports)

var counter = 0
let newShiftWire = {
let newShiftWire: () -> PythonObject = { // Type annotation required in Swift 5.4
() in
let name = "__chain_\(counter)__"
counter += 1
statements.append(Node.Decl([Node.Wire(name)]))
return Node.Identifier(name)
let name = "__chain_\(counter)__"
counter += 1
statements.append(Node.Decl([Node.Wire(name)]))
return Node.Identifier(name)
}
var previousOutput = newShiftWire()

Expand Down Expand Up @@ -280,12 +280,12 @@ func chainTop(
let portArguments = Python.list()

var counter = 0
let newShiftWire = {
let newShiftWire: () -> PythonObject = { // Type annotation required in Swift 5.4
() in
let name = "__chain_\(counter)__"
counter += 1
statements.append(Node.Decl([Node.Wire(name)]))
return Node.Identifier(name)
let name = "__chain_\(counter)__"
counter += 1
statements.append(Node.Decl([Node.Wire(name)]))
return Node.Identifier(name)
}
var previousOutput = newShiftWire()

Expand Down

0 comments on commit 2985d5c

Please sign in to comment.