aboutsummaryrefslogtreecommitdiff
path: root/src/core/lombok/javac
diff options
context:
space:
mode:
authorRawi01 <Rawi01@users.noreply.github.com>2021-06-05 18:44:01 +0200
committerRawi01 <Rawi01@users.noreply.github.com>2021-06-05 18:44:01 +0200
commit7585a539e097a2ec60e0cd7e727616c4a7559571 (patch)
treed0b9d9109450e2ad4426886c8a6d60b8c643456e /src/core/lombok/javac
parent157ee0291a2925d23ae1290285b5278a4df1030c (diff)
downloadlombok-7585a539e097a2ec60e0cd7e727616c4a7559571.tar.gz
lombok-7585a539e097a2ec60e0cd7e727616c4a7559571.tar.bz2
lombok-7585a539e097a2ec60e0cd7e727616c4a7559571.zip
[fixes #2863] Clone primitive types
Diffstat (limited to 'src/core/lombok/javac')
-rw-r--r--src/core/lombok/javac/handlers/JavacHandlerUtil.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/lombok/javac/handlers/JavacHandlerUtil.java b/src/core/lombok/javac/handlers/JavacHandlerUtil.java
index 78c20d39..45609911 100644
--- a/src/core/lombok/javac/handlers/JavacHandlerUtil.java
+++ b/src/core/lombok/javac/handlers/JavacHandlerUtil.java
@@ -106,6 +106,7 @@ import lombok.javac.Javac;
import lombok.javac.JavacAugments;
import lombok.javac.JavacNode;
import lombok.javac.JavacTreeMaker;
+import lombok.javac.JavacTreeMaker.TypeTag;
import lombok.permit.Permit;
/**
@@ -2028,7 +2029,9 @@ public class JavacHandlerUtil {
private static JCExpression cloneType0(JavacTreeMaker maker, JCTree in) {
if (in == null) return null;
- if (in instanceof JCPrimitiveTypeTree) return (JCExpression) in;
+ if (in instanceof JCPrimitiveTypeTree) {
+ return maker.TypeIdent(TypeTag.typeTag(in));
+ }
if (in instanceof JCIdent) {
return maker.Ident(((JCIdent) in).name);