Vector Test Fehler beheben

This commit is contained in:
JanUlrich 2018-02-19 04:47:10 +01:00
parent 166aa5e506
commit b7bb0fa1c4
3 changed files with 8 additions and 3 deletions

View File

@ -62,7 +62,7 @@ public class CompilationEnvironment {
}
//URLClassLoader loader = new URLClassLoader(new URL[0], cl);
//librarys = Arrays.asList(loader.getURLs());
this.sourceFiles = sourceFiles;
this.packageCrawler = new PackageCrawler(librarys);
}

View File

@ -164,7 +164,12 @@ public class SyntaxTreeGenerator{
modifiers += newModifier;
}
}
JavaClassName name = reg.getName(ctx.Identifier().getText());
String className = this.pkgName + (this.pkgName.length()>0?".":"") + ctx.Identifier().getText();
JavaClassName name = reg.getName(className);
if(! name.toString().equals(className)){
throw new TypeinferenceException("Name " + className + " bereits vorhanden in " + reg.getName(className).toString()
,ctx.getStart());
}
GenericsRegistry generics = createGenerics(ctx.typeParameters(), name, "", reg, new GenericsRegistry(globalGenerics));
Token offset = ctx.getStart();
GenericDeclarationList genericClassParameters;

View File

@ -1,6 +1,6 @@
import java.util.Vector;
class Vector{
class MyVector{
id(x){
return id2(x);