if mgu has no substitution for alpha1, final type is alpha1

This commit is contained in:
Johanna Stuber 2021-02-04 16:50:36 +01:00
parent 886ea78869
commit 49ee20baaa

View File

@ -62,8 +62,10 @@ public class TypeInferenceResult {
return substitution.getType();
}
}
throw new IllegalStateException("MGU has to contain substitution for original type variable: "
+ typeVar.toString());
return typeVar;
// TODO: correct?
// throw new IllegalStateException("MGU has to contain substitution for original type variable: "
// + typeVar.toString());
}
/**