☰
Debian Codegraph
@
15:15.3.rel1-2
15:15.3.rel1-1
/
/
gcc
/
testsuite
/
gdc.test
/
fail_compilation
/
fail77.d
☽
☼
gcc/testsuite/gdc.test/fail_compilation/fail77.d
code
plain
raw
1
/*
2
TEST_OUTPUT:
3
---
4
fail_compilation/fail77.d(11): Error: cannot cast expression `& i` of type `int*` to `ubyte[4]`
5
---
6
*/
7
void test()
8
{
9
int i;
10
ubyte[4] ub;
11
ub[] = cast(ubyte[4]) &i;
12
//ub[] = (cast(ubyte*) &i)[0..4];
13
}