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 3982604c5, druntime bc58b1e9, phobos 12329adb6.
[official-gcc.git]
/
gcc
/
testsuite
/
gdc.test
/
runnable
/
test21367.d
blob
96e8d6c66d1caaade5abc57ce2389dc50200f998
1
// https://issues.dlang.org/show_bug.cgi?id=21367
2
3
string result
=
""
;
4
5
struct
RCArray
(
T
)
6
{
7
T
*
data
;
8
this
(
this
)
9
{
10
result
~=
"A"
;
11
}
12
~
this
()
13
{
14
result
~=
"B"
;
15
}
16
}
17
18
struct
Variant
(
T
...)
19
{
20
union
21
{
22
T payload
;
23
}
24
this
(
this
)
25
{
26
result
~=
"C"
;
27
}
28
29
~
this
()
30
{
31
result
~=
"D"
;
32
}
33
}
34
35
alias
Ft
=
Variant
!(
RCArray
!
double
,
RCArray
!
int
);
36
37
void
fun
(
Ft a
) {}
38
void
main
()
39
{
40
Ft a
;
41
Ft b
=
a
;
42
}
43
44
static
~
this
()
45
{
46
assert
(
result
==
"CDD"
);
47
}