Skip to content

Commit

Permalink
check use ports for the case of implicit port number
Browse files Browse the repository at this point in the history
  • Loading branch information
jwest115 committed Sep 26, 2024
1 parent 3cb1793 commit 54ea1ff
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ object MatchedPortNumbering {
then Left(SemanticError.PortNumberOutOfRange(n, pi1.toString, maxSize1))
else if(n > maxSize2 - 1)
then Left(SemanticError.PortNumberOutOfRange(n, pi2.toString, maxSize2))
// Check to see if the port number is already in use
else if PortNumberingState.checkPortNumberInUse(n, state.numbering.usedPortNumbers)
then Left(SemanticError.PortNumberAlreadyInUse(n))
else {
val t1 = t.assignPortNumber(pi1, c1, n).assignPortNumber(pi2, c2, n)
// Update the set of used ports so that the new port number is tracked
Expand Down

0 comments on commit 54ea1ff

Please sign in to comment.