fix error on generic types

This commit is contained in:
Renaud Pawlak 2021-01-11 13:15:26 +01:00
parent 6763804c19
commit ab1efbde63

View File

@ -81,7 +81,7 @@ public class AsyncAwaitPropagationScanner extends AbstractTreeScanner {
}
}
List<MethodSymbol> candidates = new LinkedList<>();
Util.collectMatchingMethodDeclarationsInType(context.types, (TypeSymbol)parent.sym.getEnclosingElement(), parent.name.toString(), (MethodType)parent.sym.type, true, candidates);
Util.collectMatchingMethodDeclarationsInType(context.types, (TypeSymbol)parent.sym.getEnclosingElement(), parent.name.toString(), (MethodType)context.types.erasureRecursive(parent.sym.type), true, candidates);
for (MethodSymbol candidate : candidates) {
context.addExtraAnnotationType(candidate, JSweetConfig.ANNOTATION_ASYNC);
}