diff options
Diffstat (limited to 'src/core/lombok/javac')
-rw-r--r-- | src/core/lombok/javac/handlers/HandleConstructor.java | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/core/lombok/javac/handlers/HandleConstructor.java b/src/core/lombok/javac/handlers/HandleConstructor.java index 827dfcb9..ef4ba088 100644 --- a/src/core/lombok/javac/handlers/HandleConstructor.java +++ b/src/core/lombok/javac/handlers/HandleConstructor.java @@ -230,8 +230,15 @@ public class HandleConstructor { JCMethodDecl constr = createConstructor(staticConstrRequired ? AccessLevel.PRIVATE : level, onConstructor, typeNode, fields, allToDefault, suppressConstructorProperties, source); ListBuffer<Type> argTypes = new ListBuffer<Type>(); - for (JavacNode fieldNode : fields) argTypes.append(getMirrorForFieldType(fieldNode)); - List<Type> argTypes_ = argTypes.toList(); + for (JavacNode fieldNode : fields) { + Type mirror = getMirrorForFieldType(fieldNode); + if (mirror == null) { + argTypes = null; + break; + } + argTypes.append(mirror); + } + List<Type> argTypes_ = argTypes == null ? null : argTypes.toList(); injectMethod(typeNode, constr, argTypes_, Javac.createVoidType(typeNode.getSymbolTable(), CTC_VOID)); if (staticConstrRequired) { ClassSymbol sym = ((JCClassDecl) typeNode.get()).sym; |