From f59a7d221e550236b34393bff1390cd72149bf0c Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Thu, 26 Dec 2019 15:22:40 +0100 Subject: [PATCH] Fix bug #181 --- .../java/de/dhbwstuttgart/syntaxtree/factory/ASTFactory.java | 4 ++-- src/test/java/packages/mathStrucVectorTest.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/de/dhbwstuttgart/syntaxtree/factory/ASTFactory.java b/src/main/java/de/dhbwstuttgart/syntaxtree/factory/ASTFactory.java index 2fb32dbe..826184a2 100644 --- a/src/main/java/de/dhbwstuttgart/syntaxtree/factory/ASTFactory.java +++ b/src/main/java/de/dhbwstuttgart/syntaxtree/factory/ASTFactory.java @@ -189,11 +189,11 @@ public class ASTFactory { public static de.dhbwstuttgart.syntaxtree.GenericTypeVar createGeneric(TypeVariable jreTypeVar, String jreTVName, Class context, String parentMethod){ JavaClassName parentClass = new JavaClassName(context.getName()); - List genericBounds = new ArrayList<>(); + List genericBounds = new ArrayList<>(); java.lang.reflect.Type[] bounds = jreTypeVar.getBounds(); if(bounds.length > 0){ for(java.lang.reflect.Type bound : bounds){ - genericBounds.add((RefType) createType(bound)); + genericBounds.add(createType(bound)); } } return new de.dhbwstuttgart.syntaxtree.GenericTypeVar(jreTVName, genericBounds, new NullToken(), new NullToken()); diff --git a/src/test/java/packages/mathStrucVectorTest.java b/src/test/java/packages/mathStrucVectorTest.java index d28f40ec..426fd15c 100644 --- a/src/test/java/packages/mathStrucVectorTest.java +++ b/src/test/java/packages/mathStrucVectorTest.java @@ -20,7 +20,7 @@ public class mathStrucVectorTest extends TestCase { Generate ToImport class in rootDirectory and in output-Directory */ - JavaTXCompiler compiler = new JavaTXCompiler(new File(rootDirectory+"mathStruc.jav")); + JavaTXCompiler compiler = new JavaTXCompiler(new File(rootDirectory+"mathStruc.jav")); compiler.typeInference(); compiler.generateBytecode(rootDirectory + "output/"); File f = new File(rootDirectory + "output/de/test/mathStruc.class");