Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
12.0, 12.2
-
None
-
Windows 10
Description
The indentation engine seems to not be placing the 2nd last bracket in the right place. Even though I use the Format feature in the IDE, the indentation is not correct. If we add for example a comment // at the end of the 2nd last closing bracket of a function, it will indent correctly.
// Indentation problem:
function ABC( {param1, param2}) {
for (var i = 0; i < 1; i++) {
} // This bracket should be be pushed in to match the for.
}
// The following code is indenting correctly:
class Test {
static DEF( {param1, param2}) {
if (true) {
} // By putting a comment here, it allowed the IDE to indent the block correctly. If we remove it, the indentation will fail.
}