modified: src/de/dhbwstuttgart/typeinference/unify/model/TypeParams.java

Zeile 101 Dangling-else Problematik behoben
War Fehler im Occurs-Cheeck von Montanari-Martelli.
This commit is contained in:
Martin Plümicke 2018-02-01 00:17:12 +01:00
parent 1f89238fe4
commit 22499f09e8

View File

@ -98,9 +98,10 @@ public final class TypeParams implements Iterable<UnifyType>{
*/
public boolean occurs(PlaceholderType t) {
for(UnifyType p : typeParams)
if(p instanceof PlaceholderType)
if(p instanceof PlaceholderType) {//PL 2018-01-31 dangeling else Problem { ... } eingefuegt.
if(p.equals(t))
return true;
}
else
if(p.getTypeParams().occurs(t))
return true;