From 7585a539e097a2ec60e0cd7e727616c4a7559571 Mon Sep 17 00:00:00 2001 From: Rawi01 Date: Sat, 5 Jun 2021 18:44:01 +0200 Subject: [fixes #2863] Clone primitive types --- src/core/lombok/javac/handlers/JavacHandlerUtil.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/core/lombok/javac') 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); -- cgit