diff --git a/src/de/dhbwstuttgart/core/CompilationEnvironment.java b/src/de/dhbwstuttgart/core/CompilationEnvironment.java new file mode 100644 index 000000000..7cee44bc5 --- /dev/null +++ b/src/de/dhbwstuttgart/core/CompilationEnvironment.java @@ -0,0 +1,9 @@ +package de.dhbwstuttgart.core; + +/** + * Stellt die Java-Environment dar + * Speichert alle Typen, Klassen aus den benutzen SourceFiles und Librarys + */ +public class CompilationEnvironment { + +} diff --git a/src/de/dhbwstuttgart/core/JavaTXCompiler.java b/src/de/dhbwstuttgart/core/JavaTXCompiler.java index 196354e19..39bb276a2 100644 --- a/src/de/dhbwstuttgart/core/JavaTXCompiler.java +++ b/src/de/dhbwstuttgart/core/JavaTXCompiler.java @@ -22,7 +22,11 @@ import java.util.stream.Collectors; public class JavaTXCompiler { protected List sourceFiles = new ArrayList<>(); +/* + public JavaTXCompiler(List sourceFiles){ + } +*/ public List typeInference(){ List allClasses = new ArrayList<>(); for(SourceFile sf : sourceFiles){ diff --git a/src/de/dhbwstuttgart/parser/SyntaxTreeGenerator/SyntaxTreeGenerator.java b/src/de/dhbwstuttgart/parser/SyntaxTreeGenerator/SyntaxTreeGenerator.java index dd6fe1769..02e468a41 100644 --- a/src/de/dhbwstuttgart/parser/SyntaxTreeGenerator/SyntaxTreeGenerator.java +++ b/src/de/dhbwstuttgart/parser/SyntaxTreeGenerator/SyntaxTreeGenerator.java @@ -210,7 +210,7 @@ public class SyntaxTreeGenerator{ String name = header.methodDeclarator().Identifier().getText(); GenericDeclarationList gtvDeclarations = new GenericDeclarationList(new ArrayList<>(), header.getStart()); if(header.typeParameters() != null){ - gtvDeclarations = TypeGenerator.convert(header.typeParameters(), parentClass, name,reg, localGenerics); + gtvDeclarations = TypeGenerator.convert(header.typeParameters(), parentClass, name, reg, localGenerics); }else{ gtvDeclarations = new GenericDeclarationList(new ArrayList<>(), header.getStart()); } diff --git a/src/de/dhbwstuttgart/typeinference/result/ResultSet.java b/src/de/dhbwstuttgart/typeinference/result/ResultSet.java index 4fc99540e..fef925eaf 100644 --- a/src/de/dhbwstuttgart/typeinference/result/ResultSet.java +++ b/src/de/dhbwstuttgart/typeinference/result/ResultSet.java @@ -50,6 +50,7 @@ class Resolver implements ResultSetVisitor { resultPair.accept(this); } if(resolved==null){//TPH kommt nicht im Result vor: + resolved = tph; } return new ResolvedType(resolved, additionalTPHs);//resolved; diff --git a/src/de/dhbwstuttgart/typeinference/typeAlgo/TYPEStmt.java b/src/de/dhbwstuttgart/typeinference/typeAlgo/TYPEStmt.java index 4a6931416..3d6fdf5d1 100644 --- a/src/de/dhbwstuttgart/typeinference/typeAlgo/TYPEStmt.java +++ b/src/de/dhbwstuttgart/typeinference/typeAlgo/TYPEStmt.java @@ -260,6 +260,7 @@ public class TYPEStmt implements StatementVisitor{ protected Set generateParameterConstraints(MethodCall foMethod, MethodAssumption assumption, TypeInferenceBlockInformation info) { Set ret = new HashSet<>(); for(int i = 0;i convertParams(ParameterList parameterList, TypeInferenceBlockInformation info){ + protected static List convertParams(ParameterList parameterList, TypeInferenceBlockInformation info){ List params = new ArrayList<>(); for(FormalParameter fp : parameterList.getFormalparalist()){ params.add(info.checkGTV(fp.getType())); diff --git a/test/typeinference/JavaTXCompilerTest.java b/test/typeinference/JavaTXCompilerTest.java index cd8a2d24e..495d087a9 100644 --- a/test/typeinference/JavaTXCompilerTest.java +++ b/test/typeinference/JavaTXCompilerTest.java @@ -47,7 +47,6 @@ public class JavaTXCompilerTest extends JavaTXCompiler { } } } - } static String readFile(String path, Charset encoding)