repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
d: Merge upstream dmd, druntime 4c18eed967, phobos d945686a4.
[official-gcc.git]
/
gcc
/
testsuite
/
gdc.test
/
fail_compilation
/
must_use_opunary.d
blob
59248a969c4e5e4dae35e1da0bff4b7cee5ccd9f
1
/+
2
TEST_OUTPUT:
3
---
4
fail_compilation/must_use_opunary.d(20): Error: ignored value of `@mustuse` type `must_use_opunary.S`; prepend a `cast(void)` if intentional
5
---
6
+/
7
import
core
.
attribute
;
8
9
@mustuse
struct
S
10
{
11
ref
S
opUnary
(
string op
)()
return
12
{
13
return this
;
14
}
15
}
16
17
void
test
()
18
{
19
S s
;
20
-
s
;
21
}