mirror of
https://github.com/tiennm99/lombok.git
synced 2026-05-27 20:25:27 +00:00
24 lines
485 B
Java
24 lines
485 B
Java
// issue 205: val inside anonymous inner classes is a bit tricky in javac, this test ensures we don't break it.
|
|
import java.util.*;
|
|
import lombok.val;
|
|
|
|
public class ValAnonymousSubclassWithGenerics {
|
|
Object object = new Object(){
|
|
void foo() {
|
|
val j = 1;
|
|
}
|
|
};
|
|
|
|
void bar() {
|
|
val k = super.hashCode();
|
|
int x = k;
|
|
}
|
|
|
|
java.util.List<String> names = new java.util.ArrayList<String>() {
|
|
public String get(int i) {
|
|
val result = super.get(i);
|
|
return result;
|
|
}
|
|
};
|
|
}
|