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
/
fail11503c.d
blob
88565d37134a06ecc02492421f25756234bf5bce
1
/*
2
TEST_OUTPUT:
3
---
4
fail_compilation/fail11503c.d(19): Error: cannot implicitly convert expression `d.filename()` of type `const(char)[]` to `string`
5
---
6
*/
7
struct
Data
8
{
9
char
[
256
]
buffer
;
10
@property
const
(
char
)[]
filename
()
const pure nothrow return
11
{
12
return
buffer
[];
13
}
14
}
15
16
void
main
()
17
{
18
Data d
;
19
string f
=
d
.
filename
;
20
d
.
buffer
[
0
] =
'a'
;
21
}