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