aboutsummaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2021-01-01 15:29:24 +0100
committerGitHub <noreply@github.com>2021-01-01 15:29:24 +0100
commit6f218d5ba896820bfc11143fefacccca8f8042d6 (patch)
treeaf8a24c2f6a5250b65f6a13bc145b4f4e0d2ffac /src/core
parent67d66be9eccf050a5f3758273ea2d685217f6d5a (diff)
parent01cc651540120947ae1081cea6434704e508574e (diff)
downloadlombok-6f218d5ba896820bfc11143fefacccca8f8042d6.tar.gz
lombok-6f218d5ba896820bfc11143fefacccca8f8042d6.tar.bz2
lombok-6f218d5ba896820bfc11143fefacccca8f8042d6.zip
Merge pull request #2690 from mattiasgronlund/master
Do not lose generic arguments when adding annotations
Diffstat (limited to 'src/core')
-rw-r--r--src/core/lombok/javac/handlers/JavacHandlerUtil.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/lombok/javac/handlers/JavacHandlerUtil.java b/src/core/lombok/javac/handlers/JavacHandlerUtil.java
index fbde9568..9b63a523 100644
--- a/src/core/lombok/javac/handlers/JavacHandlerUtil.java
+++ b/src/core/lombok/javac/handlers/JavacHandlerUtil.java
@@ -2170,6 +2170,10 @@ public class JavacHandlerUtil {
JCExpression resType = mth.restype;
if (resType instanceof JCTypeApply) {
JCTypeApply ta = (JCTypeApply) resType;
+ if (ta.clazz instanceof JCFieldAccess) {
+ mth.restype = maker.TypeApply(maker.AnnotatedType(List.of(m), ta.clazz), ta.arguments);
+ return;
+ }
resType = ta.clazz;
}