aboutsummaryrefslogtreecommitdiff
path: root/test/transform
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2012-07-16 23:59:43 +0200
committerReinier Zwitserloot <reinier@zwitserloot.com>2012-07-17 00:15:40 +0200
commitdd18f63ee539a362fac2525c48d83ccff7a06dc9 (patch)
tree2f6a367e1134f82056a776aed6347ce59bc399bb /test/transform
parenta382c21d464c22658e8c2eea7d7d75c2a6747527 (diff)
downloadlombok-dd18f63ee539a362fac2525c48d83ccff7a06dc9.tar.gz
lombok-dd18f63ee539a362fac2525c48d83ccff7a06dc9.tar.bz2
lombok-dd18f63ee539a362fac2525c48d83ccff7a06dc9.zip
Fix for issue 396: Static constructors generated for classes with type parameters did not work in javac.
Diffstat (limited to 'test/transform')
-rw-r--r--test/transform/resource/after-delombok/Constructors.java14
-rw-r--r--test/transform/resource/after-ecj/Constructors.java11
-rw-r--r--test/transform/resource/before/Constructors.java4
3 files changed, 29 insertions, 0 deletions
diff --git a/test/transform/resource/after-delombok/Constructors.java b/test/transform/resource/after-delombok/Constructors.java
index db48b6b8..d4633dbc 100644
--- a/test/transform/resource/after-delombok/Constructors.java
+++ b/test/transform/resource/after-delombok/Constructors.java
@@ -58,4 +58,18 @@ class RequiredArgsConstructorStaticNameGenerics<T extends Number> {
public static <T extends Number> RequiredArgsConstructorStaticNameGenerics<T> of(final T x) {
return new RequiredArgsConstructorStaticNameGenerics<T>(x);
}
+}
+class RequiredArgsConstructorStaticNameGenerics2<T extends Number> {
+ final Class<T> x;
+ String name;
+
+ @java.lang.SuppressWarnings("all")
+ private RequiredArgsConstructorStaticNameGenerics2(final Class<T> x) {
+ this.x = x;
+ }
+
+ @java.lang.SuppressWarnings("all")
+ public static <T extends Number> RequiredArgsConstructorStaticNameGenerics2<T> of(final Class<T> x) {
+ return new RequiredArgsConstructorStaticNameGenerics2<T>(x);
+ }
} \ No newline at end of file
diff --git a/test/transform/resource/after-ecj/Constructors.java b/test/transform/resource/after-ecj/Constructors.java
index e6dd8a21..e994702f 100644
--- a/test/transform/resource/after-ecj/Constructors.java
+++ b/test/transform/resource/after-ecj/Constructors.java
@@ -51,4 +51,15 @@
public static @java.lang.SuppressWarnings("all") <T extends Number>RequiredArgsConstructorStaticNameGenerics<T> of(final T x) {
return new RequiredArgsConstructorStaticNameGenerics<T>(x);
}
+}
+@lombok.RequiredArgsConstructor(staticName = "of") class RequiredArgsConstructorStaticNameGenerics2<T extends Number> {
+ final Class<T> x;
+ String name;
+ private @java.lang.SuppressWarnings("all") RequiredArgsConstructorStaticNameGenerics2(final Class<T> x) {
+ super();
+ this.x = x;
+ }
+ public static @java.lang.SuppressWarnings("all") <T extends Number>RequiredArgsConstructorStaticNameGenerics2<T> of(final Class<T> x) {
+ return new RequiredArgsConstructorStaticNameGenerics2<T>(x);
+ }
} \ No newline at end of file
diff --git a/test/transform/resource/before/Constructors.java b/test/transform/resource/before/Constructors.java
index 272fa850..d3ed3504 100644
--- a/test/transform/resource/before/Constructors.java
+++ b/test/transform/resource/before/Constructors.java
@@ -22,3 +22,7 @@
final T x;
String name;
}
+@lombok.RequiredArgsConstructor(staticName="of") class RequiredArgsConstructorStaticNameGenerics2<T extends Number> {
+ final Class<T> x;
+ String name;
+}