diff options
author | Reinier Zwitserloot <reinier@zwitserloot.com> | 2021-09-16 02:04:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-16 02:04:35 +0200 |
commit | ad04c1833c78be6ec2c3ac223fad096c0ce39180 (patch) | |
tree | f5b75b506269f429f9f75e39575ce390de18c635 /src/core/lombok | |
parent | 485c3533bb1b84887f17243c258fdf485b8ea15a (diff) | |
parent | 7585a539e097a2ec60e0cd7e727616c4a7559571 (diff) | |
download | lombok-ad04c1833c78be6ec2c3ac223fad096c0ce39180.tar.gz lombok-ad04c1833c78be6ec2c3ac223fad096c0ce39180.tar.bz2 lombok-ad04c1833c78be6ec2c3ac223fad096c0ce39180.zip |
Merge pull request #2868 from Rawi01/clone-primitive-type
Clone primitive types
Diffstat (limited to 'src/core/lombok')
-rw-r--r-- | src/core/lombok/javac/handlers/JavacHandlerUtil.java | 5 |
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 8fdf9a7f..a41264e8 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; /** @@ -2051,7 +2052,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); |