Debian Codegraph @

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

raw
1 /*
2 REQUIRED_ARGS: -Ifail_compilation/imports/
3 EXTRA_FILES: imports/import21508.d
4 TEST_OUTPUT:
5 ---
6 fail_compilation/fail21508.d(17): Error: import `fail21508.import21508` is used as a type
7 ---
8 */
9 import import21508;
10
11 // import21508 is a private class, code should not compile
12 // The compiler used to "helpfully" look inside the import,
13 // bypassing the shadowing that this introduces.
14
15 void main ()
16 {
17 auto c = new import21508();
18 }