Debian Codegraph @

gcc/testsuite/gdc.test/fail_compilation/diag10359.d

raw
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/diag10359.d(10): Error: pointer slicing is not allowed in a `@safe` function
5 ---
6 */
7
8 void foo(int* p) @safe
9 {
10 auto a = p[0 .. 10];
11 }