mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-13 10:15:53 +00:00
Fix for issue 396: Static constructors generated for classes with type parameters did not work in javac.
This commit is contained in:
1 parent
a382c21d46
commit
dd18f63ee5
5 files changed
+104
-12
No files matched your search
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user