mirror of
https://github.com/tiennm99/lombok.git
synced 2026-09-13 20:20:46 +00:00
Javac parser handles ";" (empty statements) as empty blocks with an invalid position. Thats why delomok replaces ";" with "{}". This gets an issue when you use this in an interface, since interfaces are not allowed to have initializer blocks.
36 lines
479 B
Java
36 lines
479 B
Java
enum Ranks {
|
|
CLUBS, HEARTS, DIAMONDS, SPADES;;
|
|
}
|
|
|
|
enum Complex {
|
|
RED("ff0000"), GREEN("00ff00"), BLUE("0000f");
|
|
|
|
private final String webColour;
|
|
|
|
Complex(String webColour) {
|
|
this.webColour = webColour;
|
|
}
|
|
|
|
public String getWebColour() {
|
|
return webColour;
|
|
}
|
|
}
|
|
|
|
enum Complexer {
|
|
RED {
|
|
public void foo() {
|
|
}
|
|
public void bar() {
|
|
}
|
|
},
|
|
GREEN("foo") {
|
|
public void foo() {
|
|
}
|
|
};
|
|
public abstract void foo();
|
|
Complexer(String colour) {
|
|
}
|
|
Complexer() {
|
|
}
|
|
}
|