gcc/testsuite/gdc.test/runnable/test17181b.d
raw| 1 | // EXTRA_SOURCES: imports/test17181a.d |
| 2 | // EXTRA_FILES: imports/test17181c.d |
| 3 | module test17181b; |
| 4 | |
| 5 | import imports.test17181c; // only imported, not compiled |
| 6 | // => must not be in ModuleInfo.importedModules |
| 7 | |
| 8 | static this() |
| 9 | { |
| 10 | // By instantiating the getA template, its local imports.test17181a |
| 11 | // import is added to this module (not to imports.test17181c), and its |
| 12 | // module ctor must have run already. |
| 13 | assert(imports.test17181c.getA!() == 1); |
| 14 | } |
| 15 | |
| 16 | void main() {} |