From 5f0582baeff8e0b69848c895454cb0684ae14a4c Mon Sep 17 00:00:00 2001 From: Rawi01 Date: Mon, 9 Jan 2023 23:10:45 +0100 Subject: [fixes #3274] Reset erasure_field of symbol --- src/core/lombok/javac/handlers/HandleUtilityClass.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/core/lombok/javac/handlers/HandleUtilityClass.java') diff --git a/src/core/lombok/javac/handlers/HandleUtilityClass.java b/src/core/lombok/javac/handlers/HandleUtilityClass.java index 716d6d63..b20aee3a 100644 --- a/src/core/lombok/javac/handlers/HandleUtilityClass.java +++ b/src/core/lombok/javac/handlers/HandleUtilityClass.java @@ -128,8 +128,11 @@ public class HandleUtilityClass extends JavacAnnotationHandler { JCClassDecl innerClassDecl = (JCClassDecl) element.get(); innerClassDecl.mods.flags |= Flags.STATIC; ClassSymbol innerClassSymbol = innerClassDecl.sym; - if (innerClassSymbol != null && innerClassSymbol.type instanceof ClassType) { - ((ClassType) innerClassSymbol.type).setEnclosingType(Type.noType); + if (innerClassSymbol != null) { + if (innerClassSymbol.type instanceof ClassType) { + ((ClassType) innerClassSymbol.type).setEnclosingType(Type.noType); + } + innerClassSymbol.erasure_field = null; } } } -- cgit