Zig Version
0.9.0-dev.1678+7747bf07c
Steps to Reproduce
Run zig fmt on this sequence of inputs.
const x = .{.{},};
const x = .{.{.{},},};
const x = .{.{.{.{},},},};
or
const x = T{T{},};
const x = T{T{T{},},};
const x = T{T{T{T{},},},};
And so on...
Expected Behavior
Formatter goes fast
Actual Behavior
Each iteration takes twice as long as the previous. It takes about 20 iterations to get to 1 second execution time. Deleting the commas fixes this problem.
Zig Version
0.9.0-dev.1678+7747bf07c
Steps to Reproduce
Run
zig fmton this sequence of inputs.const x = .{.{},};const x = .{.{.{},},};const x = .{.{.{.{},},},};or
const x = T{T{},};const x = T{T{T{},},};const x = T{T{T{T{},},},};And so on...Expected Behavior
Formatter goes fast
Actual Behavior
Each iteration takes twice as long as the previous. It takes about 20 iterations to get to 1 second execution time. Deleting the commas fixes this problem.