mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-13 12:15:00 +00:00
Fixed a problem where @Data with a static constructor and generics params on the class would generate errors regarding IllegalArgumentException in setSourcePosition in ASTNode.
This commit is contained in:
1 parent
ba6f353fd8
commit
aa40323ae8
2 files changed
+6
-1
No files matched your search
@@ -143,6 +143,11 @@ public class Eclipse {
|
||||
o.modifiers = param.modifiers;
|
||||
o.name = param.name;
|
||||
o.type = copyType(param.type);
|
||||
o.sourceStart = param.sourceStart;
|
||||
o.sourceEnd = param.sourceEnd;
|
||||
o.declarationEnd = param.declarationEnd;
|
||||
o.declarationSourceStart = param.declarationSourceStart;
|
||||
o.declarationSourceEnd = param.declarationSourceEnd;
|
||||
if ( param.bounds != null ) {
|
||||
TypeReference[] b = new TypeReference[param.bounds.length];
|
||||
int idx2 = 0;
|
||||
|
||||
@@ -258,7 +258,7 @@ public class HandleData implements EclipseAnnotationHandler<Data> {
|
||||
TypeReference[] refs = new TypeReference[typeDecl.typeParameters.length];
|
||||
int idx = 0;
|
||||
for ( TypeParameter param : typeDecl.typeParameters ) {
|
||||
refs[idx++] = new SingleTypeReference(param.name, 0);
|
||||
refs[idx++] = new SingleTypeReference(param.name, (long)param.sourceStart << 32 | param.sourceEnd);
|
||||
}
|
||||
constructor.returnType = new ParameterizedSingleTypeReference(typeDecl.name, refs, 0, p);
|
||||
} else constructor.returnType = new SingleTypeReference(((TypeDeclaration)type.get()).name, p);
|
||||
|
||||
Reference in new issue
Block a user