Skip to content

Commit

Permalink
Suppress duplicate fundep relations
Browse files Browse the repository at this point in the history
Prevent addition of duplicate fundep entries by moving the no-match case
inside the update block.
  • Loading branch information
jbouwman authored and eliaslfox committed Apr 3, 2024
1 parent 5505c2f commit 8c4db84
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/typechecker/environment.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -1369,17 +1369,17 @@
(fundep-entry-from s)
from-tys
(fundep-entry-to s)
to-tys))))))

;; Insert a new relation if there wasn't a match
(setf env
(insert-fundep-entry%
env
(ty-class-name class)
i
(make-fundep-entry
:from from-tys
:to to-tys)))))
to-tys)))))

;; Insert a new relation if there wasn't a match
(setf env
(insert-fundep-entry%
env
(ty-class-name class)
i
(make-fundep-entry
:from from-tys
:to to-tys))))))

env)

Expand Down

0 comments on commit 8c4db84

Please sign in to comment.