| 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 "must be at global scope" } |
| 14 |
} |
| 15 |
|
| 16 |
struct Baz |
| 17 |
{ |
| 18 |
module forth; // { dg-error "unexpected module directive" } |
| 19 |
// { dg-message "line break after .module." "" { target *-*-* } .-1 } |
| 20 |
}; |
| 21 |
|
| 22 |
void Bink () |
| 23 |
{ |
| 24 |
module fifth; // { dg-error "unexpected module directive" } |
| 25 |
// { dg-message "line break after .module." "" { target *-*-* } .-1 } |
| 26 |
} |
| 27 |
|
| 28 |
module a.; // { dg-error "only permitted as" } |
| 29 |
|