Skip to content

Commit fdb8535

Browse files
Impose arity constraint in the connect signature
Co-authored-by: Fredrik Bagge Carlson <[email protected]>
1 parent 2f8aa2a commit fdb8535

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/systems/connectors.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ function Base.show(io::IO, c::Connection)
6969
end
7070

7171
# symbolic `connect`
72-
function connect(syss::AbstractSystem...)
73-
length(syss) >= 2 || error("connect takes at least two systems!")
72+
function connect(sys1::AbstractSystem, sys2::AbstractSystem, syss::AbstractSystem...)
73+
syss = (sys1, sys2, syss...)
7474
length(unique(nameof, syss)) == length(syss) || error("connect takes distinct systems!")
7575
Equation(Connection(), Connection(syss)) # the RHS are connected systems
7676
end

0 commit comments

Comments
 (0)