From 1ad5540500b7f40d2c90829e9257c2f86dcfd0d3 Mon Sep 17 00:00:00 2001 From: Victorious3 Date: Tue, 28 Mar 2023 13:28:05 +0200 Subject: [PATCH] Fix wrong class generics being used --- .../java/de/dhbwstuttgart/target/generate/ASTToTargetAST.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/de/dhbwstuttgart/target/generate/ASTToTargetAST.java b/src/main/java/de/dhbwstuttgart/target/generate/ASTToTargetAST.java index 14dd4afe..3fb42ee1 100644 --- a/src/main/java/de/dhbwstuttgart/target/generate/ASTToTargetAST.java +++ b/src/main/java/de/dhbwstuttgart/target/generate/ASTToTargetAST.java @@ -537,6 +537,7 @@ public class ASTToTargetAST { var classGenerics = generics(owner); var genericsOfClass = classGenerics.javaGenerics(); + var txGenericsOfClass = classGenerics.txGenerics(); var simplifiedConstraints = new HashSet<>(this.simplifiedConstraints); HashSet txTypeVariables = new HashSet<>(); @@ -545,7 +546,7 @@ public class ASTToTargetAST { HashSet javaTypeVariablesOfClass = new HashSet<>(); methodFindTypeVariables(method, genericsOfClass, javaTypeVariablesOfClass, javaTypeVariables, equality); - methodFindTypeVariables(method, genericsOfClass, txTypeVariablesOfClass, txTypeVariables, txEquality); + methodFindTypeVariables(method, txGenericsOfClass, txTypeVariablesOfClass, txTypeVariables, txEquality); methodFindConstraints(owner, method, simplifiedConstraints, javaTypeVariables, classGenerics.userDefinedGenerics, javaTypeVariablesOfClass, javaResult, equality); methodFindConstraints(owner, method, simplifiedConstraints, txTypeVariables, classGenerics.userDefinedGenerics, txTypeVariablesOfClass, txResult, txEquality);