forked from JavaTX/JavaCompilerCore
Bug in subst in Unfify.java gepatched
This commit is contained in:
parent
7d4009b6ae
commit
56c5ec7e18
@ -800,7 +800,7 @@ public class SourceFile
|
|||||||
Stream<Vector<Pair>> streamconstraintsclone = indexeset.stream().map(x -> x.stream()
|
Stream<Vector<Pair>> streamconstraintsclone = indexeset.stream().map(x -> x.stream()
|
||||||
.map(i -> constraintsClone.elementAt(i))
|
.map(i -> constraintsClone.elementAt(i))
|
||||||
.collect(Vector::new, Vector::add, Vector::addAll));
|
.collect(Vector::new, Vector::add, Vector::addAll));
|
||||||
// Vector<Vector<Pair>> vecconstraintsclone = streamconstraintsclone.collect(Vector::new, Vector::add, Vector::addAll);
|
//Vector<Vector<Pair>> vecconstraintsclone = streamconstraintsclone.collect(Vector::new, Vector::add, Vector::addAll);
|
||||||
|
|
||||||
//Schritt 4: Unifikation
|
//Schritt 4: Unifikation
|
||||||
Vector<Vector<Vector<Pair>>> vecunifyResult =
|
Vector<Vector<Vector<Pair>>> vecunifyResult =
|
||||||
|
@ -2358,6 +2358,8 @@ throws MatchException
|
|||||||
{
|
{
|
||||||
// Parameterliste durchgehen
|
// Parameterliste durchgehen
|
||||||
Vector vTemp = ((RefType)T).get_ParaList();
|
Vector vTemp = ((RefType)T).get_ParaList();
|
||||||
|
Boolean ret = true; //EINGEFUEGT PL 14-01-16: Return darf erst am Ende zurückgegeben werden und nicht in den ifs
|
||||||
|
//sonst werden nicht alle Elemente der Forschleife durchlaufen
|
||||||
for( int i = 0; i < vTemp.size(); i++ )
|
for( int i = 0; i < vTemp.size(); i++ )
|
||||||
{
|
{
|
||||||
Type Temp = (Type)vTemp.elementAt(i);
|
Type Temp = (Type)vTemp.elementAt(i);
|
||||||
@ -2374,16 +2376,17 @@ throws MatchException
|
|||||||
// Typvariable ersetzen
|
// Typvariable ersetzen
|
||||||
Vector<Type> vParaListTemp = ((RefType)T).get_ParaList();
|
Vector<Type> vParaListTemp = ((RefType)T).get_ParaList();
|
||||||
vParaListTemp.set( i, o ); // i. Element ersetzen
|
vParaListTemp.set( i, o ); // i. Element ersetzen
|
||||||
return true;
|
ret = true; //GEAENDERT PL 14-01-16
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if( Temp instanceof RefType )
|
if( Temp instanceof RefType )
|
||||||
{
|
{
|
||||||
Pair PTemp = new Pair( Temp, null);
|
Pair PTemp = new Pair( Temp, null);
|
||||||
inferencelog.debug(" TV!!!" + PTemp.toString() );
|
inferencelog.debug(" TV!!!" + PTemp.toString() );
|
||||||
return Subst( PTemp, 1, a, o, bMitVorbedingung );
|
ret = Subst( PTemp, 1, a, o, bMitVorbedingung ); //GEAENDERT PL 14-01-16
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return ret; //EINGEFUEGT PL 14-01-16
|
||||||
}
|
}
|
||||||
|
|
||||||
// TV substituieren
|
// TV substituieren
|
||||||
|
Loading…
Reference in New Issue
Block a user