mirror of
https://github.com/dlang-community/dfmt.git
synced 2025-04-25 21:00:03 +03:00

I have formatted them both to look like the the individual bad output and not like the actual output from formatting the issue0432.d file with the current implementation. The current implementation makes it look like a new / different problem.
38 lines
747 B
D
38 lines
747 B
D
struct S1
|
|
{
|
|
ulong x;
|
|
ulong y;
|
|
ulong function(ulong)f;
|
|
}
|
|
|
|
struct S2
|
|
{
|
|
ulong x;
|
|
ulong y;
|
|
ulong z;
|
|
ulong w;
|
|
}
|
|
|
|
// -----------------------------------------------------------------------------
|
|
// Example 1
|
|
// Anonymous function in struct, long struct initializer
|
|
|
|
immutable S1 s1 = {
|
|
1111111111111111111, 1111111111111111111, (x) { return x + 1111; },};
|
|
|
|
void f1()
|
|
{
|
|
}
|
|
|
|
// -----------------------------------------------------------------------------
|
|
// Example 2
|
|
// Anonymous function anywhere, long struct initializer
|
|
|
|
int function(int) f2 = (x) { return x + 1111; };
|
|
|
|
immutable S2 s = {
|
|
1111111111111111111, 1111111111111111111, 1111111111111111111, 1111111111111111111,};
|
|
|
|
void f2()
|
|
{
|
|
}
|