Fix variables leaking when adding other system under transaction

This commit is contained in:
Denis Zharkov
2019-12-02 17:03:28 +03:00
parent 692442d7a2
commit 5b4e8170ae
@@ -165,6 +165,9 @@ class NewConstraintSystemImpl(
}
override fun addOtherSystem(otherSystem: ConstraintStorage) {
otherSystem.allTypeVariables.forEach {
transactionRegisterVariable(it.value)
}
storage.allTypeVariables.putAll(otherSystem.allTypeVariables)
for ((variable, constraints) in otherSystem.notFixedTypeVariables) {
notFixedTypeVariables[variable] = MutableVariableWithConstraints(constraints.typeVariable, constraints.constraints)