Debian Codegraph @

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

raw
1 // https://issues.dlang.org/show_bug.cgi?id=21275
2 // EXTRA_FILES: imports/fail21275a.d
3
4 /*
5 TEST_OUTPUT:
6 ---
7 fail_compilation/fail21275.d(17): Error: function `imports.fail21275a.Foo.x` of type `ref int() return` is not accessible from module `fail21275`
8 fail_compilation/fail21275.d(20): Error: function `imports.fail21275a.Bar.x` of type `int(int)` is not accessible from module `fail21275`
9 ---
10 */
11
12 void main()
13 {
14 import imports.fail21275a;
15
16 auto f = Foo();
17 f.x = 3;
18
19 auto b = Bar();
20 b.x = 3;
21 }