forked from JavaTX/JavaCompilerCore
modified: src/de/dhbwstuttgart/core/JavaTXCompiler.java
modified: test/typeinference/UnifyTest.java
This commit is contained in:
parent
5c797a44a1
commit
51a2acdbaf
@ -154,8 +154,33 @@ public class JavaTXCompiler {
|
||||
((PlaceholderType)x.getRhsType()).disableWildcardtable();
|
||||
}
|
||||
}
|
||||
return x;HIER DIE JEWEILS RECHT BZW. LINKE SEITE AUF GLEICHE VARIANZ SETZEN WIE DIE JEWEILS ANDERE SEITE
|
||||
}).collect(Collectors.toCollection(HashSet::new));
|
||||
return x;//HIER DIE JEWEILS RECHT BZW. LINKE SEITE AUF GLEICHE VARIANZ SETZEN WIE DIE JEWEILS ANDERE SEITE
|
||||
})//.map( y -> {
|
||||
if ((y.getLhsType() instanceof PlaceholderType) && (x.getRhsType() instanceof PlaceholderType)) {
|
||||
|
||||
if (paraTypeVarNames.contains(x.getLhsType().getName())) {
|
||||
((PlaceholderType)x.getLhsType()).setVariance((byte)1);
|
||||
((PlaceholderType)x.getLhsType()).disableWildcardtable();
|
||||
}
|
||||
if (returnTypeVarNames.contains(x.getLhsType().getName())) {
|
||||
((PlaceholderType)x.getLhsType()).setVariance((byte)-1);
|
||||
((PlaceholderType)x.getLhsType()).disableWildcardtable();
|
||||
}
|
||||
}
|
||||
if ((x.getRhsType() instanceof PlaceholderType)) {
|
||||
if (paraTypeVarNames.contains(x.getRhsType().getName())) {
|
||||
((PlaceholderType)x.getRhsType()).setVariance((byte)1);
|
||||
((PlaceholderType)x.getRhsType()).disableWildcardtable();
|
||||
}
|
||||
if (returnTypeVarNames.contains(x.getRhsType().getName())) {
|
||||
((PlaceholderType)x.getRhsType()).setVariance((byte)-1);
|
||||
((PlaceholderType)x.getRhsType()).disableWildcardtable();
|
||||
}
|
||||
}
|
||||
return x;
|
||||
|
||||
if (y.getLhsType().getVariance() != 0) { y.getRhsType().setVariance(y.getLhsType().getVariance()); } })
|
||||
.collect(Collectors.toCollection(HashSet::new));
|
||||
Set<Set<UnifyPair>> result = unify.unifySequential(xConsSet, finiteClosure, logFile);
|
||||
//Set<Set<UnifyPair>> result = unify.unify(xConsSet, finiteClosure);
|
||||
System.out.println("RESULT: " + result);
|
||||
|
@ -65,14 +65,14 @@ public class UnifyTest {
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
@Test
|
||||
public void matrix() throws IOException, ClassNotFoundException {
|
||||
execute(new File(rootDirectory+"Matrix.jav"));
|
||||
//JavaTXCompiler compiler = new JavaTXCompiler(new File(rootDirectory+"Matrix.jav"));
|
||||
//compiler.generateBytecode();
|
||||
}
|
||||
|
||||
*/
|
||||
/*
|
||||
@Test
|
||||
public void vector() throws IOException, ClassNotFoundException {
|
||||
|
Loading…
Reference in New Issue
Block a user