diff --git a/tests/allman/issue0432.d.ref b/tests/allman/issue0432.d.ref index fde6383..9edb2d9 100644 --- a/tests/allman/issue0432.d.ref +++ b/tests/allman/issue0432.d.ref @@ -1,4 +1,11 @@ -struct S +struct S1 +{ + ulong x; + ulong y; + ulong function(ulong) f; +} + +struct S2 { ulong x; ulong y; @@ -6,12 +13,28 @@ struct S ulong w; } -immutable int function(int) f = (x) { return x + 1111; }; +// ----------------------------------------------------------------------------- +// 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 S s = { +immutable S2 s = { 1111111111111111111, 1111111111111111111, 1111111111111111111, 1111111111111111111, }; -void main() +void f2() { } diff --git a/tests/issue0432.d b/tests/issue0432.d index 9140425..bbaa2bb 100644 --- a/tests/issue0432.d +++ b/tests/issue0432.d @@ -1,4 +1,11 @@ -struct S +struct S1 +{ + ulong x; + ulong y; + ulong function(ulong)f; +} + +struct S2 { ulong x; ulong y; @@ -6,14 +13,26 @@ struct S ulong w; } -immutable int function(int) f = (x) { return x + 1111; }; +// ----------------------------------------------------------------------------- +// 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 S s = { - 1111111111111111111, - 1111111111111111111, - 1111111111111111111, - 1111111111111111111,}; +immutable S2 s = { + 1111111111111111111, 1111111111111111111, 1111111111111111111, 1111111111111111111,}; - void main() + void f2() { } diff --git a/tests/knr/issue0432.d.ref b/tests/knr/issue0432.d.ref index 9f54651..f403c86 100644 --- a/tests/knr/issue0432.d.ref +++ b/tests/knr/issue0432.d.ref @@ -1,16 +1,38 @@ -struct S { +struct S1 { + ulong x; + ulong y; + ulong function(ulong) f; +} + +struct S2 { ulong x; ulong y; ulong z; ulong w; } -immutable int function(int) f = (x) { return x + 1111; }; +// ----------------------------------------------------------------------------- +// 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 S s = { +immutable S2 s = { 1111111111111111111, 1111111111111111111, 1111111111111111111, 1111111111111111111, }; -void main() +void f2() { } diff --git a/tests/otbs/issue0432.d.ref b/tests/otbs/issue0432.d.ref index 81cae57..4690082 100644 --- a/tests/otbs/issue0432.d.ref +++ b/tests/otbs/issue0432.d.ref @@ -1,15 +1,36 @@ -struct S { +struct S1 { + ulong x; + ulong y; + ulong function(ulong) f; +} + +struct S2 { ulong x; ulong y; ulong z; ulong w; } -immutable int function(int) f = (x) { return x + 1111; }; +// ----------------------------------------------------------------------------- +// 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 S s = { +immutable S2 s = { 1111111111111111111, 1111111111111111111, 1111111111111111111, 1111111111111111111, }; -void main() { +void f2() { }