Debian Codegraph @

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

raw
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/ice13835.d(15): Error: value of `this` is not known at compile time
5 fail_compilation/ice13835.d(21): Error: template instance `ice13835.Foo!int` error instantiating
6 ---
7 */
8
9 class Foo(T)
10 {
11 private T* _data;
12
13 final private void siftUp(int position) nothrow
14 {
15 static T crash = *(this._data + position);
16 }
17 }
18
19 void main()
20 {
21 auto heap = new Foo!(int);
22 }