diff --git a/src/qir/types/QIRSomeType.java b/src/qir/types/QIRSomeType.java
index c103839071e494565f54182593302fe26b399779..50d65e403150599d517cace99b999d6200f91f69 100644
--- a/src/qir/types/QIRSomeType.java
+++ b/src/qir/types/QIRSomeType.java
@@ -5,7 +5,7 @@ import java.util.Optional;
 public class QIRSomeType extends QIRType {
     private static int idGen = 0;
 
-    private final int id;
+    private int id;
     private Optional<QIRType> infered = Optional.empty();
 
     public QIRSomeType() {
@@ -29,6 +29,8 @@ public class QIRSomeType extends QIRType {
             infered = Optional.of(other);
             return true;
         }
+        if (other instanceof QIRSomeType)
+            id = ((QIRSomeType) other).id;
         if (!infered.isPresent() || other.isSubtypeOf(infered.get())) {
             if (other instanceof QIRSomeType) {
                 if (((QIRSomeType) other).infered.isPresent())