forked from JavaTX/JavaCompilerCore
Fix inner type variables
This commit is contained in:
parent
b58b6c2288
commit
84a5ed2cc3
@ -499,15 +499,17 @@ public class ASTToTargetAST {
|
||||
|
||||
// For eliminating inner type variables we need to figure out which ones are actually used
|
||||
// TODO Maybe don't do this twice?
|
||||
var referenced = new HashSet<TypePlaceholder>();
|
||||
var usedTphs = new HashSet<TypePlaceholder>();
|
||||
for (var param : method.getParameterList().getFormalparalist()) {
|
||||
referenced.addAll(findTypeVariables(param.getType()));
|
||||
usedTphs.addAll(findTypeVariables(param.getType()));
|
||||
}
|
||||
referenced.addAll(findTypeVariables(method.getReturnType()));
|
||||
usedTphs.addAll(findTypeVariables(method.getReturnType()));
|
||||
var referenced = new HashSet<>(usedTphs);
|
||||
referenced.addAll(typeVariablesOfClass);
|
||||
|
||||
eliminateInnerTypeVariables(referenced, result);
|
||||
usedTPHsOfMethods.put(method, referenced);
|
||||
|
||||
usedTPHsOfMethods.put(method, usedTphs);
|
||||
|
||||
System.out.println(method.name + ": " + result);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user