forked from JavaTX/JavaCompilerCore
Fehler beheben
This commit is contained in:
parent
87cf674352
commit
9f2702276f
@ -69,6 +69,9 @@ public class ASPFactory implements TypeVisitor<String>{
|
||||
String pointer = ASPStringConverter.toConstant(NameGenerator.makeNewName());
|
||||
Iterator<String> it = pointers.iterator();
|
||||
String p = pointer;
|
||||
if(!it.hasNext()){
|
||||
return ASPRule.ASP_PARAMLIST_END_POINTER.toString();
|
||||
}
|
||||
while (it.hasNext()){
|
||||
ASPStatement stmt;
|
||||
String type = it.next();
|
||||
@ -93,7 +96,7 @@ public class ASPFactory implements TypeVisitor<String>{
|
||||
params.add(param.acceptTV(this));
|
||||
}
|
||||
String typeName = ASPStringConverter.toConstant(refType.getName());
|
||||
String ruleName = isFCType?ASPRule.ASP_TYPE.toString():ASPRule.ASP_FCTYPE.toString();
|
||||
String ruleName = isFCType?ASPRule.ASP_FCTYPE.toString():ASPRule.ASP_TYPE.toString();
|
||||
ASPStatement stmt = makeStatement(ruleName, pointer, typeName, convertParameterlist(params));
|
||||
writer.add(stmt);
|
||||
return pointer;
|
||||
|
@ -27,9 +27,10 @@ public class UnifyWithoutWildcards {
|
||||
@Test
|
||||
public void adapt() throws InterruptedException, IOException, ClassNotFoundException {
|
||||
ConstraintSet<Pair> testSet = new ConstraintSet<>();
|
||||
List<RefTypeOrTPHOrWildcardOrGeneric> list = Arrays.asList(TypePlaceholder.fresh(new NullToken()));
|
||||
RefType t1 = new RefType(new JavaClassName("asp.UnifyWithoutWildcards$Matrix"), new NullToken());
|
||||
RefType t2 = new RefType(new JavaClassName("Vector"), list, new NullToken());
|
||||
List<RefTypeOrTPHOrWildcardOrGeneric> list1 = Arrays.asList(TypePlaceholder.fresh(new NullToken()));
|
||||
List<RefTypeOrTPHOrWildcardOrGeneric> list2 = Arrays.asList(TypePlaceholder.fresh(new NullToken()));
|
||||
RefType t1 = new RefType(new JavaClassName("asp.UnifyWithoutWildcards$Matrix"), list1, new NullToken());
|
||||
RefType t2 = new RefType(new JavaClassName("Vector"), list2, new NullToken());
|
||||
testSet.addUndConstraint(new Pair(t1, t2, PairOperator.SMALLERDOT));
|
||||
ResultSet resultSet = run(testSet);
|
||||
System.out.println(resultSet.results);
|
||||
|
Loading…
Reference in New Issue
Block a user