mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-13 14:16:11 +00:00
Fixed issues with val in inner classes, and re-enabled a test that caught it that we ignored earlier.
This commit is contained in:
1 parent
a6170f5298
commit
e5860edabe
8 files changed
+111
-9
No files matched your search
@@ -0,0 +1,28 @@
|
||||
import java.util.*;
|
||||
import lombok.val;
|
||||
public class ValAnonymousSubclassWithGenerics {
|
||||
Object object = new Object() {
|
||||
x() {
|
||||
super();
|
||||
}
|
||||
void foo() {
|
||||
final @val int j = 1;
|
||||
}
|
||||
};
|
||||
java.util.List<String> names = new java.util.ArrayList<String>() {
|
||||
x() {
|
||||
super();
|
||||
}
|
||||
public String get(int i) {
|
||||
final @val java.lang.String result = super.get(i);
|
||||
return result;
|
||||
}
|
||||
};
|
||||
public ValAnonymousSubclassWithGenerics() {
|
||||
super();
|
||||
}
|
||||
void bar() {
|
||||
final @val int k = super.hashCode();
|
||||
int x = k;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user