Debian Codegraph @

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

raw
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/fail11163.d(12): Error: cannot implicitly convert expression `foo()` of type `int[]` to `immutable(int[])`
5 fail_compilation/fail11163.d(13): while evaluating `pragma(msg, a)`
6 ---
7 */
8 int[] foo() {
9 return [1];
10 }
11 void main() {
12 immutable a = foo();
13 pragma(msg, a);
14 }