forked from JavaTX/JavaCompilerCore
modified: ../src/main/java/de/dhbwstuttgart/syntaxtree/visual/OutputGenerator.java
modified: ../src/main/java/de/dhbwstuttgart/typeinference/typeAlgo/TYPEStmt.java einige Korrekturen
This commit is contained in:
parent
c68d773486
commit
084b54d295
@ -123,6 +123,9 @@ public class OutputGenerator implements ASTVisitor{
|
|||||||
f.accept(this);
|
f.accept(this);
|
||||||
out.append("\n");
|
out.append("\n");
|
||||||
}
|
}
|
||||||
|
if (classOrInterface.getfieldInitializations().isPresent()) {//PL 2019-11-28: Zum Ausdrucken der Fieldinitializer
|
||||||
|
classOrInterface.getfieldInitializations().get().accept(this);
|
||||||
|
}
|
||||||
for(Method m : classOrInterface.getMethods()){
|
for(Method m : classOrInterface.getMethods()){
|
||||||
out.append(tabs);
|
out.append(tabs);
|
||||||
m.accept(this);
|
m.accept(this);
|
||||||
|
@ -110,7 +110,7 @@ public class TYPEStmt implements StatementVisitor{
|
|||||||
for(FieldAssumption fieldAssumption : info.getFields(fieldVar.fieldVarName)){
|
for(FieldAssumption fieldAssumption : info.getFields(fieldVar.fieldVarName)){
|
||||||
Constraint constraint = new Constraint();
|
Constraint constraint = new Constraint();
|
||||||
GenericsResolver resolver = getResolverInstance();
|
GenericsResolver resolver = getResolverInstance();
|
||||||
constraint.add(new Pair(fieldVar.receiver.getType(), fieldAssumption.getReceiverType(resolver), PairOperator.EQUALSDOT));
|
constraint.add(new Pair(fieldVar.receiver.getType(), fieldAssumption.getReceiverType(resolver), PairOperator.SMALLERDOT)); //PL 2019-12-09: SMALLERDOT eingefuegt, EQUALSDOT entfernt, wenn ds Field privat ist muesste es EQUALSDOT lauten
|
||||||
constraint.add(new Pair(
|
constraint.add(new Pair(
|
||||||
fieldVar.getType(), fieldAssumption.getType(resolver), PairOperator.EQUALSDOT));
|
fieldVar.getType(), fieldAssumption.getType(resolver), PairOperator.EQUALSDOT));
|
||||||
oderConstraints.add(constraint);
|
oderConstraints.add(constraint);
|
||||||
@ -568,8 +568,11 @@ public class TYPEStmt implements StatementVisitor{
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
RefTypeOrTPHOrWildcardOrGeneric retType = assumption.getReceiverType(resolver);
|
RefTypeOrTPHOrWildcardOrGeneric retType = assumption.getReceiverType(resolver);
|
||||||
methodConstraint.add(new Pair(forMethod.receiver.getType(), retType,
|
methodConstraint.add(forMethod.name.equals("apply") ? //PL 2019-11-29: Tenaerer Operator eingefügt, weil bei Lambda-Ausdrücken keine Suntype FunN$$ existiert
|
||||||
PairOperator.SMALLERDOT));
|
new Pair(forMethod.receiver.getType(), retType, PairOperator.EQUALSDOT)
|
||||||
|
: new Pair(forMethod.receiver.getType(), retType, PairOperator.SMALLERDOT));
|
||||||
|
|
||||||
|
|
||||||
methodConstraint.add(new Pair(assumption.getReturnType(resolver), forMethod.getType(),
|
methodConstraint.add(new Pair(assumption.getReturnType(resolver), forMethod.getType(),
|
||||||
PairOperator.EQUALSDOT));
|
PairOperator.EQUALSDOT));
|
||||||
methodConstraint.addAll(generateParameterConstraints(forMethod, assumption, info, resolver));
|
methodConstraint.addAll(generateParameterConstraints(forMethod, assumption, info, resolver));
|
||||||
|
Loading…
Reference in New Issue
Block a user