From c37c33be46961fd6ebc8bec24cee24f62d066f03 Mon Sep 17 00:00:00 2001 From: Jan Rieke Date: Tue, 3 Apr 2018 12:12:48 +0200 Subject: wildcards for the constructor parameter --- src/core/lombok/javac/handlers/HandleSuperBuilder.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/lombok/javac/handlers/HandleSuperBuilder.java b/src/core/lombok/javac/handlers/HandleSuperBuilder.java index 2d844432..2c292822 100644 --- a/src/core/lombok/javac/handlers/HandleSuperBuilder.java +++ b/src/core/lombok/javac/handlers/HandleSuperBuilder.java @@ -377,7 +377,13 @@ public class HandleSuperBuilder extends JavacAnnotationHandler { ListBuffer params = new ListBuffer(); long flags = JavacHandlerUtil.addFinalIfNeeded(Flags.PARAMETER, typeNode.getContext()); Name builderClassname = typeNode.toName(builderClassName); - JCVariableDecl param = maker.VarDef(maker.Modifiers(flags), builderVariableName, maker.Ident(builderClassname), null); + // Now add the . + ListBuffer typeParams = new ListBuffer(); + JCWildcard wildcard = maker.Wildcard(maker.TypeBoundKind(BoundKind.UNBOUND), null); + typeParams.add(wildcard); + typeParams.add(wildcard); + JCTypeApply paramType = maker.TypeApply(maker.Ident(builderClassname), typeParams.toList()); + JCVariableDecl param = maker.VarDef(maker.Modifiers(flags), builderVariableName, paramType, null); params.append(param); if (callBuilderBasedSuperConstructor) { -- cgit