1 // { dg-additional-options "-fmodules-ts" }
2 module;
3 
4 export module frist;
5 // { dg-module-cmi "!frist" }
6 
7 import frist; // { dg-error {cannot import module.* in its own purview} }
8 
9 module foo.second; // { dg-error "only permitted as" }
10 
11 namespace Foo
12 {
13 module third;  // { dg-error "only permitted as" }
14 }
15 
16 struct Baz
17 {
18   module forth; // { dg-error "expected" }
19 };
20 
Bink()21 void Bink ()
22 {
23   module fifth; // { dg-error "expected" }
24 }
25 
26 module a.; // { dg-error "only permitted as" }
27 
28 // { dg-prune-output "not writing module" }
29 
30