8202473: A type variable with multiple bounds does not correctly place type annotation

Reviewed-by: jfranck
This commit is contained in:
Rafael Winterhalter 2020-09-17 07:26:49 +00:00 committed by Joel Borggrén-Franck
parent b87a159967
commit 53a4ef2670
2 changed files with 83 additions and 3 deletions

View file

@ -301,11 +301,12 @@ public final class TypeAnnotationParser {
l.add(t);
}
}
TypeAnnotation[] typeAnnotations = l.toArray(EMPTY_TYPE_ANNOTATION_ARRAY);
res[i] = AnnotatedTypeFactory.buildAnnotatedType(bounds[i],
AnnotatedTypeFactory.nestingForType(bounds[i], loc),
l.toArray(EMPTY_TYPE_ANNOTATION_ARRAY),
candidates.toArray(EMPTY_TYPE_ANNOTATION_ARRAY),
(AnnotatedElement)decl);
typeAnnotations,
typeAnnotations,
decl);
}
return res;
}