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
/
fail92.d
blob
ba4655e7025b39735eaaa902a5b1b094cc2df1f5
1
/*
2
TEST_OUTPUT:
3
---
4
fail_compilation/fail92.d(15): Error: invalid `foreach` aggregate `t` of type `typeof(null)`
5
fail_compilation/fail92.d(23): Error: template instance `fail92.crash!(typeof(null))` error instantiating
6
---
7
*/
8
9
// [25]
10
11
template
crash
(
T
)
12
{
13
void
crash
(
T t
)
14
{
15
foreach
(
u
;
t
)
16
{
17
}
18
}
19
}
20
21
void
main
()
22
{
23
crash
(
null
);
24
}