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
/
fail11355.d
blob
50897ad802a32c9bcdfc72e94769e7e12e10115b
1
/*
2
TEST_OUTPUT:
3
---
4
fail_compilation/fail11355.d(28): Error: struct `fail11355.A` is not copyable because it has a disabled postblit
5
---
6
*/
7
8
T
move
(
T
)(
ref
T source
)
9
{
10
return
T
.
init
;
// Dummy rvalue
11
}
12
13
struct
A
14
{
15
~
this
() {}
16
@disable
this
(
this
);
// Prevent copying
17
}
18
19
struct
B
20
{
21
A a
;
22
alias
a
this
;
23
}
24
25
void
main
()
26
{
27
B b
;
28
A a
=
move
(
b
);
29
}