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
{{ message }}
Repository navigation
[2.10.2] Text block method call arguments not indented correctly in context of assignment #977
classSomeClass {
voiddoSomething() {
// badvartest = """ line 1 line 2 """.formatted(
1,
"some text long enough to cause a wrap of these arguments",
2,
3
);
// goodvartest = """ line 1 line 2 """
.formatted(
1,
"some text long enough to cause a wrap of these arguments",
2,
3
)
.formatted(5);
// goodSystem.out.println(
""" line 1 line 2 """.formatted(
1,
"some text long enough to cause a wrap of these arguments",
2,
3
)
);
}
}
Expected Output (see bad specifically):
classSomeClass {
voiddoSomething() {
// badvartest = """ line 1 line 2 """.formatted(
1,
"some text long enough to cause a wrap of these arguments",
2,
3
);
// goodvartest = """ line 1 line 2 """
.formatted(
1,
"some text long enough to cause a wrap of these arguments",
2,
3
)
.formatted(5);
// goodSystem.out.println(
""" line 1 line 2 """.formatted(
1,
"some text long enough to cause a wrap of these arguments",
2,
3
)
);
}
}
This seems to be limited to situations where there is a text block, with a single, unchained method called on it, having wrapped arguments, which is then used in assignment.
Activity