You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is related to #3697, but in terms of implementation it's an entirely separate issue. Anyway, when you have a commented type member like so:
// this is a commentprivatestaticinta = 2;
And you remove private and static, the comment also disappears.
inta = 2;
This happens because of how the field is split into source fragments, the modifier list becoming one collection of fragments. When the comment is to be printed (which happens when the next concrete element is printed, in this case int, as comments are treated like whitespace), the non-printed modifier list "blocks" discovery of the comment when searching for preceding whitespace/comments to print.
I'm working on a fix.
The text was updated successfully, but these errors were encountered:
Hi!
This is related to #3697, but in terms of implementation it's an entirely separate issue. Anyway, when you have a commented type member like so:
And you remove
private
andstatic
, the comment also disappears.This happens because of how the field is split into source fragments, the modifier list becoming one collection of fragments. When the comment is to be printed (which happens when the next concrete element is printed, in this case
int
, as comments are treated like whitespace), the non-printed modifier list "blocks" discovery of the comment when searching for preceding whitespace/comments to print.I'm working on a fix.
The text was updated successfully, but these errors were encountered: