mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 21:21:48 +03:00
19 lines
387 B
D
19 lines
387 B
D
/+
|
|
TEST_OUTPUT:
|
|
---
|
|
fail_compilation/must_use.d(17): Error: ignored value of `@mustuse` type `must_use.S`; prepend a `cast(void)` if intentional
|
|
fail_compilation/must_use.d(18): Error: ignored value of `@mustuse` type `must_use.S`; prepend a `cast(void)` if intentional
|
|
---
|
|
+/
|
|
import core.attribute;
|
|
|
|
@mustuse struct S {}
|
|
|
|
S fun();
|
|
|
|
void test()
|
|
{
|
|
int x;
|
|
fun();
|
|
fun(), x++;
|
|
}
|