aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2010-08-14 04:05:27 +0200
committerReinier Zwitserloot <reinier@zwitserloot.com>2010-08-14 04:05:27 +0200
commit2043399d3916cf5c1b34b9552394f25d58068008 (patch)
tree6bd07b5785bfcec4b7b1d7b75d2f26ab3f8f64e6
parent8d012f6734146fcd22a7d69f7389dc9de1897c2d (diff)
downloadlombok-2043399d3916cf5c1b34b9552394f25d58068008.tar.gz
lombok-2043399d3916cf5c1b34b9552394f25d58068008.tar.bz2
lombok-2043399d3916cf5c1b34b9552394f25d58068008.zip
delombok added type parameters to constructors that mirror the type's own type parameters. This resulted in delombok turning any generated constructor that takes at least 1 parameter of type 'T' into something that didn't compile, and to boot, a confusing error message. This is now fixed.
Fixes issue #140.
-rw-r--r--src/core/lombok/javac/handlers/HandleConstructor.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/core/lombok/javac/handlers/HandleConstructor.java b/src/core/lombok/javac/handlers/HandleConstructor.java
index 36deb013..c2332974 100644
--- a/src/core/lombok/javac/handlers/HandleConstructor.java
+++ b/src/core/lombok/javac/handlers/HandleConstructor.java
@@ -175,7 +175,6 @@ public class HandleConstructor {
private JCMethodDecl createConstructor(AccessLevel level, JavacNode typeNode, List<JavacNode> fields, boolean suppressConstructorProperties) {
TreeMaker maker = typeNode.getTreeMaker();
- JCClassDecl type = (JCClassDecl) typeNode.get();
List<JCStatement> nullChecks = List.nil();
List<JCStatement> assigns = List.nil();
@@ -203,7 +202,7 @@ public class HandleConstructor {
}
return maker.MethodDef(mods, typeNode.toName("<init>"),
- null, type.typarams, params, List.<JCExpression>nil(), maker.Block(0L, nullChecks.appendList(assigns)), null);
+ null, List.<JCTypeParameter>nil(), params, List.<JCExpression>nil(), maker.Block(0L, nullChecks.appendList(assigns)), null);
}
private boolean isLocalType(JavacNode type) {