gcc/testsuite/gdc.test/fail_compilation/must_use_comma.d
raw| 1 | /+ |
| 2 | TEST_OUTPUT: |
| 3 | --- |
| 4 | fail_compilation/must_use_comma.d(16): Error: ignored value of `@mustuse` type `must_use_comma.S`; prepend a `cast(void)` if intentional |
| 5 | --- |
| 6 | +/ |
| 7 | import core.attribute; |
| 8 | |
| 9 | @mustuse struct S {} |
| 10 | |
| 11 | S fun() { return S(); } |
| 12 | void sideEffect() {} |
| 13 | |
| 14 | void test() |
| 15 | { |
| 16 | (fun(), sideEffect()); |
| 17 | } |