mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-03 20:33:31 +07:00
GitOrigin-RevId: 571a82f66623887c1b5008963df842b2597c58c9
21 lines
513 B
Java
21 lines
513 B
Java
// "Convert compact constructor to canonical" "true-preview"
|
|
import java.lang.annotation.ElementType;
|
|
import java.lang.annotation.Target;
|
|
|
|
public record Test(int x, @ParamAnno int y, @FieldAnno int... other) {
|
|
@ConstructorAnno
|
|
<caret>public Test {
|
|
this.x = Math.abs(x);
|
|
if (other == null) other = new int[0];
|
|
}
|
|
}
|
|
|
|
@Target(ElementType.PARAMETER)
|
|
@interface ParamAnno {}
|
|
|
|
@Target(ElementType.FIELD)
|
|
@interface FieldAnno {}
|
|
|
|
@Target(ElementType.CONSTRUCTOR)
|
|
@interface ConstructorAnno {}
|