record Record(
        @Annotation long x
) {
    public boolean isEqual(Object other) {
        return (other instanceof Record(@Annotation var y)) // Error here: both an annotation and 'var' must be present
                && x == y;
    }
}

@interface Annotation {
}
