-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update test to include both known cases
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.
- Loading branch information
1 parent
876bbe3
commit c0452db
Showing
4 changed files
with
105 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,40 @@ | ||
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() | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +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 = { | ||
1111111111111111111, | ||
1111111111111111111, | ||
1111111111111111111, | ||
1111111111111111111,}; | ||
immutable S2 s = { | ||
1111111111111111111, 1111111111111111111, 1111111111111111111, 1111111111111111111,}; | ||
|
||
void main() | ||
void f2() | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() { | ||
} |