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
MATCH: Improve `A CMP 0 ? A : -A` set of patterns to use bitwise_equal_p.
[official-gcc.git]
/
gcc
/
testsuite
/
gdc.test
/
fail_compilation
/
ice9759.d
blob
6608b58fc0b6526d4f49682c92d9d92f731994f5
1
/*
2
TEST_OUTPUT:
3
---
4
fail_compilation/ice9759.d(25): Error: mutable method `ice9759.Json.opAssign` is not callable using a `const` object
5
fail_compilation/ice9759.d(17): Consider adding `const` or `inout` here
6
---
7
*/
8
9
struct
Json
10
{
11
union
12
{
13
Json
[]
m_array
;
14
Json
[
string
]
m_object
;
15
}
16
17
void
opAssign
(
Json v
)
18
{
19
}
20
}
21
22
void
bug
()
23
{
24
const
(
Json
)
r
;
25
r
=
r
.
init
;
26
}