mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-16 02:15:36 +00:00
If field resolution isn’t available, don’t try to make a symbol for the constructor (typemirrors).
This commit is contained in:
1 parent
5a7f02ca05
commit
00ce9a72e6
1 file changed
+9
-2
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user