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 26f049fb26, phobos 330d6a4fd.
[official-gcc.git]
/
gcc
/
testsuite
/
gdc.test
/
compilable
/
testdip1008.d
blob
54d404c993f89992ef241fdc9213fe1b4e8e86fe
1
// PERMUTE_ARGS:
2
// REQUIRED_ARGS: -preview=dip1008
3
4
int
bar
()
5
{
6
try
7
{
8
throw new
Exception
(
"message"
);
9
}
10
catch
(
Exception e
)
11
{
12
return
7
;
13
}
14
}
15
16
void
throwQualifiers
()
@safe @nogc
pure
17
{
18
throw new
Exception
(
"baz"
);
19
}
20
21
bool
testThrowQualifiers
()
22
{
23
try
24
{
25
throwQualifiers
();
26
}
catch
(
Exception e
)
27
{
28
return true
;
29
}
30
31
return false
;
32
}
33
34
void
foo
()
35
{
36
enum
r
=
bar
();
37
static assert
(
r
==
7
);
38
39
static assert
(
testThrowQualifiers
());
40
}